Open luke-ncc opened 1 week ago
A simple CompoSt visualisation tool. This tool can be used to view surfaces, splines, and ply edges and cross-sections.
The current schema defines each object structure in isolation, instead of leveraging object composition. This causes the structure to be bloated
For example, the start of the definition of CompositeElement:
"CompositeElement": { "properties": { "memberName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Membername" },
And the start of the definition of Ply, which should be part of the composition of CompositeElement,
"Ply": { "properties": { "memberName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Membername" },
This could be simplified by only defining ply with properties specific to that object:
"Ply": { "properties": { "material": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Material" }, "orientation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Orientation" }, "splineRelimitationRef": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Splinerelimitationref" } }, "title": "Ply", "type": "object" }
And then using composition by adding a property to the definition:
"allOf": [ { "$ref": "#/$defs/CompositeElement" }, { "Definition of a ply goes here": "" } ]
v0.67
No response
Describe the project you are working on
A simple CompoSt visualisation tool. This tool can be used to view surfaces, splines, and ply edges and cross-sections.
Describe the issue you have come across
The current schema defines each object structure in isolation, instead of leveraging object composition. This causes the structure to be bloated
What features of the format does this affect?
For example, the start of the definition of CompositeElement:
And the start of the definition of Ply, which should be part of the composition of CompositeElement,
This could be simplified by only defining ply with properties specific to that object:
And then using composition by adding a property to the definition:
Version
v0.67
Relevant log output
No response