Geometry Operations API¶
Core add/update/remove geometry state operations used by the editor.
Constants¶
- `updateGeometry` ⇒
void Update a geometry object
- `addGeometry` ⇒
string Add a new geometry
- `removeGeometry` ⇒
void Remove a geometry
Functions¶
- `mergeGeometryObject(baseObject, patchObject)` ⇒
Object Merge a partial geometry patch into an existing geometry object. Nested transform/dimension fields are merged deeply for known keys.
updateGeometry ⇒ void¶
Update a geometry object
Kind: global constant
Params
- geometries
Object- The current geometries state - id
string- The ID of the geometry to update - updatedObject
Object- The updated geometry object - keepSelected
boolean- Whether to keep the object selected after update - isLiveUpdate
boolean- Whether this is a live update - extraData
Object- Extra data for special updates - setGeometries
function- Function to update geometries state - setSelectedGeometry
function- Function to update selected geometry - selectedGeometry
string- Currently selected geometry - updateAssembliesFunc
function- Function to update assemblies - propagateCompoundIdToDescendants
function- Function to propagate compound ID
addGeometry ⇒ string¶
Add a new geometry
Kind: global constant
Returns: string - The name of the added geometry
Params
- newGeometry
Object- The new geometry to add - geometries
Object- The current geometries state - setGeometries
function- Function to update geometries state - setSelectedGeometry
function- Function to update selected geometry - propagateCompoundIdToDescendants
function- Function to propagate compound ID
removeGeometry ⇒ void¶
Remove a geometry
Kind: global constant
Params
- id
string- The ID of the geometry to remove - geometries
Object- The current geometries state - setGeometries
function- Function to update geometries state - setSelectedGeometry
function- Function to update selected geometry - selectedGeometry
string- Currently selected geometry
mergeGeometryObject(baseObject, patchObject) ⇒ Object¶
Merge a partial geometry patch into an existing geometry object. Nested transform/dimension fields are merged deeply for known keys.
Kind: global function
Returns: Object - Merged geometry object.
Params
- baseObject
Object- Existing geometry object. - patchObject
Object- Partial update patch.