-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Meta Data Use Cases
Note: Syntax borrowed from Java Annotations, just to show how it's meant to be used.
-
Project: https://github.com/openscad/openscad/wiki/Project:-Form-based-script-parameterization
-
Customizer-like GUI: https://github.com/openscad/openscad/issues/722
-
Adding marker() nodes: https://github.com/openscad/openscad/pull/952
-
Multi-file export (from one scad file): https://github.com/openscad/openscad/issues/1041
-
Add layer() support to DXF export: https://github.com/openscad/openscad/issues/1044
-
Module Labels: https://github.com/openscad/openscad/issues/1450
Example use case is a parameter window similar to the Thingiverse Customizer. The meta-data adds information about the model parameter like description, default value and date range.
See http://files.openscad.org/video/screencast-parameter-window.webm
- Parameter GUI / Customizer
@Param(default = 3, values = [ 1, 3, 6])
variable = 0;
@Description(text = "Metric screw")
module screw(@Param() diameter, @Param() length) {
...
}
Example use case could be an automatically generated list of available modules: Import the library -> Compile -> List of available parts with description for the module and parameters is generated.
See http://files.openscad.org/video/screencast-library-window.webm
- Library parts descriptions
module model2D(diameter, length) {
...
}
@DxfLayer(name = "layer1")
model2D();
@DxfLayer(name = "layer2")
translate([20, 0]) model2D();
Attached to module instantiation the meta data can allow to collect data like bills of materials. This would also need to include values of the instance (e.g. the diameter and length of a screw() module).
- Bill of Material
- Additional information for slicers, e.g. Modifier Meshes / Layer height
- Export options, e.g. Layers for DXF, Multiple volumes for AMF
- Labels for modules to show in the viewport