-
Notifications
You must be signed in to change notification settings - Fork 3
Thoughts on Implementation
For a project with many parts and sub-assemblies, the TTN spec could be implemented in such a way that each part has its own thing metadata file, and these are collated into a tracker via a build process of some sort.
Take the parts defined in the BOM ideas page. These could be defined in files alongside each source file. e.g.
thing1/stls/part1.scad
- Contains the source code for Part #1.
thing1/stls/part1.stl
- Is the derivative file for Part #1.
thing1/stls/part1.thing
- This defines the metadata which corresponds with the source files.
- The file contents could be accessed via the (API)[/API] with a URL such as
https://example.com/tracker/thing/00000000-0000-0000-0000-000000000002
- The contents would be similar to the following:
{
"UUID":"00000000-0000-0000-0000-000000000002",
"title":"Part #1",
"URL":"https://example.com/thing1/stls/part1.stl",
"billOfMaterials":[
{
"partNumber":"1",
"type": "source",
"description":"Part #1 Source",
"URL":"https://example.com/thing1/stls/part1.scad"
},
{
"partNumber":"2",
"description":"Part #1 Derivative",
"type": "derivative",
"URL":"https://example.com/thing1/stls/part1.stl"
}
]
}
With such metadata available it may be possible to integrate with Josef Prusa's ThingDoc.
In ThingDoc, the BOM and assembly instructions are stored as Javadoc-like comments either in the source code, or in external metadata files (identified with extension .tdoc). A python script then pulls the information together to produce BOMs and assembly instructions.