This PR proposes minor changes to the JSON object structure for geometry properties:
The "hierarchy" array has been renamed to "children". The array now only contains the children of the root geometry. A redundant representation of the root geometry in the array as with the previous "hierarchy" is not required anymore. Consequently, the "parent" property is not required for direct children of the root geometry anymore but only for nested children. This makes the entire JSON object a bit more compact.
Since the root geometry is not contained in "children" anymore, its geometry "type" must now be defined as property of the JSON object. This has the advantage that both "type" and "objectId" of the root geometry are now available from the JSON object without having to iterate over "hierarchy" as in the previous representation.
There is no implicit assumption about the ordering of the "children" array anymore. Previously, parents were assumed to be stored before their children.
The "type" property is now mandatory for both the root geometry and all children.
Examples:
General content of the JSON object:
{
"type": 9, // mandatory geometry type of the root geometry
"objectId": "my-geometry", // optional object ID of the root geometry
"is2D": false, // optional, default is false
"children": [ // optional
...
]
}
This PR proposes minor changes to the JSON object structure for geometry properties:
The
"hierarchy"
array has been renamed to"children"
. The array now only contains the children of the root geometry. A redundant representation of the root geometry in the array as with the previous"hierarchy"
is not required anymore. Consequently, the"parent"
property is not required for direct children of the root geometry anymore but only for nested children. This makes the entire JSON object a bit more compact.Since the root geometry is not contained in
"children"
anymore, its geometry"type"
must now be defined as property of the JSON object. This has the advantage that both"type"
and"objectId"
of the root geometry are now available from the JSON object without having to iterate over"hierarchy"
as in the previous representation.There is no implicit assumption about the ordering of the
"children"
array anymore. Previously, parents were assumed to be stored before their children.The
"type"
property is now mandatory for both the root geometry and all children.Examples:
General content of the JSON object:
A point geometry:
A solid geometry: