New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module Labels #1450
Comments
Having an optional string label per instance would be interesting.
etc. This sounds a bit like a discussion for OpenSCAD2. @doug-moen did this ever cross you mind? |
Even more meta-data like discussed in #722 :-). |
In OpenSCAD2, "objects" are a general mechanism for associating metadata An object literal has the syntax { ...statements... }, where each statement If you are calling a module M that returns an unlabelled object, and you On 15 November 2015 at 02:06, Marius Kintel notifications@github.com
|
I looked for documentation on the syntax of customizer annotations. All
that I've found so far is this example:
https://github.com/openscad/openscad/blob/model-meta-data3/examples/Parametric/sign.scad
How this fits in to OpenSCAD2 is that name/value pairs within an object can
have customizer annotations. For example, here's an object literal:
{
@description("Height of the cube")
@parameter([1 : 10])
height = 5;
cube(height);
}
|
I said "OpenSCAD2 doesn't care if the agreed name is 'label' or '$label' or 'label'." I showed how to use the 'overlay' operator to add a label to a geometric object. As an alternative, we could wrap that up inside a 'label' function, which would add label metadata data to a geometric object:
This is just like the syntax for adding color metadata to a shape. |
I've collected some use cases there: https://github.com/openscad/openscad/wiki/Meta-Data-Use-Cases Main point of meta data is that it's not evaluated by the script itself, but by some code in the OpenSCAD application itself (or maybe later by some kind of plugin). |
In OpenSCAD2, meta data is evaluated by the script itself, can be queried Bill of materials is quite easy to do in OpenSCAD2 using object metadata. On 15 November 2015 at 14:10, Torsten Paul notifications@github.com wrote:
|
It would be nice if it was possible to label modules, i.e. if the name of the modules would pop up as a tooltip if you mouse over it in the preview window.
An additional view option would be "Show Labels" to show them all the time.
And as a final iteration, it would be nice if you could define arbitrary strings for the label.
Define a builtion $label variable for modules that can be set as a default parameter to a module or within the module as an assignment, but also can be given as a parameter on instantiation to overwrite the default.
It may be beneficial to be able to export those labels into the export formats too.
Keep up the good work. But labels and bezier curves is what I miss most so far working with openSCAD.
Regards
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: