Skip to content
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

Naming Objects #558

Closed
thesourcerer8 opened this issue Jun 16, 2017 · 11 comments
Closed

Naming Objects #558

thesourcerer8 opened this issue Jun 16, 2017 · 11 comments

Comments

@thesourcerer8
Copy link

I would like to be able to assign (programmatically) names to objects and have those names be used when exporting to X3D, STL, ... where the export formats support names, so that I can more easily reference the objects in X3D.
Support for the animation capabilities of X3D would be great as well.

I have been asked to reassign this issue here:
EinsteinsWorkshop/BlocksCAD#17 (comment)

@z3dev
Copy link
Member

z3dev commented Jun 16, 2017

@thesourcerer8 Thanks!

We'll see if this is possible, but think so.

@z3dev z3dev transferred this issue from jscad/csg.js Apr 17, 2020
@z3dev
Copy link
Member

z3dev commented May 2, 2020

@thesourcerer8 can you help define what you would like the X3D file to contain? there's a lot of possibilities.

https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#NamingConventions

https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Meshes

I'm thinking that a DEF attribrutue could be added.

@thesourcerer8
Copy link
Author

Yes, a DEF attribute seems to be the way to do it.

@z3dev
Copy link
Member

z3dev commented May 2, 2020

Do you want names in another export format, like DXF?

@thesourcerer8
Copy link
Author

I think it would be a good idea to put the names in all the output formats that support them.

@z3dev
Copy link
Member

z3dev commented Sep 24, 2020

Support of 'name' attribute added to V2 DXF serializer. #684

@z3dev
Copy link
Member

z3dev commented Apr 7, 2021

Comment... each serializer should provide a list of supported attributes, such as 'name' or 'class' or 'id'. In addition, these attributes need to be preserved by generalize(), possibly a new option.

@z3dev
Copy link
Member

z3dev commented Apr 7, 2021

From the forum... concerning SVG serialization

'class' element for sure is interesting as it will ease styling. About 'id', yes it must be used carefully to ensure that each object has its unique id, generally I use names forged from data (line between triangle 23 and 111 has id 'L_23_111', etc.). 'name' is deprecated so it's maybe wise to avoid it, on very old js code I remember i used 'tag', as svg doesn't use it, as svg can use custom attributes, it can be anything. And it would be really great to have exported svg from jscad with such fine details, because it will allow rework those outputs with great ease.

@z3dev z3dev mentioned this issue Jan 2, 2022
3 tasks
@z3dev
Copy link
Member

z3dev commented Jan 23, 2022

Support of 'id' and ‘class’ attributes added to V2 SVG serializer. #974

@z3dev
Copy link
Member

z3dev commented May 11, 2022

Summary of serializers:

@z3dev
Copy link
Member

z3dev commented Aug 13, 2022

Closing this issue as the relevant serializers have been changed to support names, ids, etc.

@z3dev z3dev closed this as completed Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants