jupytercad/JupyterCAD

Have a UUID property for objects

Opened this issue ยท 3 comments

Renaming an existing object is problematic today if the object is used in a boolean operator.

We should have a UUID attached to each object that is not controlled by the user, and boolean operators would use this and not the object names as input.

Adding a note that we rely on checking for edge- prefix or -front or -back suffixes in the mainview implementation to see if we select the main object or something else.

This is a poor choice as naming an object with such suffix or prefix may break the entire logic. Having UUIDs for names separated from the display name would be better and prevent issues.

As discussed with @trungleduc and @arjxn-py:

  • We might need to start introducing the schema version into the metadata field of jcad file
  • We need to switch the underlying objects structure from a list to a dictionary
  • we could support multiple schema versions at once

The schema version check should be in 3.0.0, so that in the future when users open a jcad file with a schema version greater than the supported one, they can get the error dialog.