FormIt Plugin API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
WSM.Utils API

Description

Functions

json WSM.Utils.AngleFullCircleInRadians (normal, vecA, vecB, returnPositive)
 AngleFullCircleInRadians Parameters: In: normal, vecA, vecB, returnPositive Out: double.
 
json WSM.Utils.AppendSelectionToGroupInstancePathArray (aInput, aOutput)
 AppendSelectionToGroupInstancePathArray Parameters: In: aInput Out: std.vector<WSM.GroupInstancePath>
 
json WSM.Utils.AppendToGroupInstancePathArray (nHistoryID, aInput, aOutput)
 AppendSelectionToGroupInstancePathArray Parameters: In: path, aInput Out: std.vector<WSM.GroupInstancePath>
 
json WSM.Utils.ComputeFaceCentroid (historyID, faceID)
 ComputeFaceCentroid Parameters: In: historyID, faceID Out: success (bool), centroid (WSM.Point3d)
 
json WSM.Utils.ComputeFaceNormal (historyID, faceID)
 ComputeFaceNormal Parameters: In: historyID, faceID Out: bool, WSM.UnitVector3d
 
json WSM.Utils.ConvertToFaces (aPaths)
 ConvertToFaces Parameters: In: aPaths); Out: std.vector<WSM.GroupInstancePath>
 
json WSM.Utils.ConvertToTopLevel (nHistoryID, aObjectIDs, bAllowInstances, bAllowOwnedFaces)
 ConverToTopLevel Parameters: In: nHistoryID, aObjectIDs, bAllowInstances Out: std.vector<size_t>
 
json WSM.Utils.ConvertToTopLevelPaths (aPaths, bAllowInstances, bAllowOwnedFaces)
 ConverToTopLevelPaths Parameters: In: aPaths, bAllowInstances Out: std.vector<WSM.GroupInstancePath>
 
json WSM.Utils.DeleteObjectsIncludeSmoothAttachments (nHistoryID, toDelete)
 DeleteObjectsIncludeSmoothAttachments Parameters: In: nHistoryID, toDelete
 
json WSM.Utils.ExpandSelection (nHistoryID, objectID, selectionlevel, filter, bCanExpandInstances)
 
json WSM.Utils.GetAllNonOwnedGeometricObjects (nHistoryID)
 GetAllNonOwnedGeometricObjects Parameters: In: nHistoryID Out: vector<size_t>
 
json WSM.Utils.GetAxisAlignedBoundingBox (aObjectIDs, CS)
 GetAxisAlignedBoundingBox Parameters: In: aObjectIDs, CS (WSM.Utils.CoordSystem) WSM.Utils.CoordSystem.HCS The History being edited coordinate system.
 
json WSM.Utils.GetCoedgePoints (nHistoryID, coedgeID)
 GetCoedgePoints Parameters: In: nHistoryID, coedgeID Out: bool, WSM.Point3d, WSM.Point3d
 
json WSM.Utils.GetEdgeCurveType (nHistoryID, edgeId)
 GetEdgeCurveType Parameters: In: nHistoryID, edgeId Out: type, size_t AttribID
 
json WSM.Utils.GetEdgeIDFromCoedge (nHistoryID, coedgeID)
 GetEdgeIDFromCoedge Parameters: In: nHistoryID, coedgeID Out: size_t
 
json WSM.Utils.GetEdgeLine (nHistoryID, edge)
 GetEdgeLine Parameters: In: nHistoryID, edge Out: Line3d
 
json WSM.Utils.GetFaceIDFromCoedge (nHistoryID, coedgeID)
 GetFaceIDFromCoedge Parameters: In: nHistoryID, coedgeID Out: size_t
 
json WSM.Utils.GetFacePoints (facePath)
 GetFacePoints Parameters: In: facePath Out: std.vector<WSM.Point3d>
 
json WSM.Utils.GetGroupInstanceNonOwnedGeometricObjects (instance)
 GetGroupInstanceNonOwnedGeometricObjects Parameters: In: instance Out: std.vector<WSM.GroupInstancePath>
 
json WSM.Utils.GetMemoryInfo (nHistoryID)
 GetMemoryInfo Parameters: In: nHistoryID Out: aRefdHistoryIDs, nFullSize, nCollapsedSize
 
json WSM.Utils.GetVertexCurveAttributes (historyID, vertexID)
 GetVertexCurveAttributes Parameters: In: historyID, vertexID Out: std.vector<std.pair<size_t, size_t>> aAttributeIDs
 
json WSM.Utils.HasSmoothEdge (nHistoryID, nObjectID)
 HasSmoothEdge Parameters: In: nHistoryID, nObjectID Out: true/false
 
json WSM.Utils.IsBackFace (path, cameraPos, cameraDir, perspectiveView)
 IsBackFace Parameters: In: path, cameraPos, cameraDir, perspectiveView Out: true/false
 
json WSM.Utils.IsLayerHidden (nHistoryID, id)
 IsLayerHidden Parameters: In: nHistoryID, id Out: true/false
 
json WSM.Utils.IsObjectHidden (nHistoryID, nObjectID)
 IsObjectHidden Parameters: In: nHistoryID, nObjectID Out: true/false
 
json WSM.Utils.IsObjectHiddenByPath (path)
 IsObjectHiddenByPath Parameters: In: path Out: true/false
 
json WSM.Utils.IsLayerNotPickable (nHistoryID, id)
 IsLayerNotPickable Parameters: In: nHistoryID, id Out: true/false
 
json WSM.Utils.IsObjectNotPickable (nHistoryID, nObjectID)
 IsObjectNotPickable Parameters: In: nHistoryID, nObjectID Out: true/false
 
json WSM.Utils.IsObjectNotPickableByPath (path)
 IsObjectNotPickableByPath Parameters: In: path Out: true/false
 
json WSM.Utils.IsObjectType (path, nObjectTypes)
 IsObjectType Parameters: In: path, nObjectTypes Out: bool
 
json WSM.Utils.IsOnCurveJunction (path, bInferencing)
 
json WSM.Utils.IsSelectAllConnected (nHistoryID, selectedObjectIDs)
 IsSelectAllConnected Parameters: In: nHistoryID, selectedObjectIDs Out: true/false
 
json WSM.Utils.IsSilhouetteEdge (nHistoryID, edgeId, cameraPos, cameraDir, perspectiveView)
 IsSilhouetteEdge Parameters: In: nHistoryID, edgeId, cameraPos, cameraDir, perspectiveView Out: true/false
 
json WSM.Utils.IsSmooth (path)
 IsSmooth Parameters: In: path Out: true/false
 
json WSM.Utils.IsTopLevelObjectHidden (nHistoryID, nObjectID)
 IsTopLevelObjectHidden Parameters: In: path Out: true/false
 
json WSM.Utils.IsTopLevelObjectHiddenByPath (path)
 IsTopLevelObjectHiddenByPath Parameters: In: path Out: true/false
 
json WSM.Utils.IsVertexEditable (nHistoryID, nObjectID)
 IsVertexEditable Parameters: In: nHistoryID, nObjectID Out: true/false
 
json WSM.Utils.IsVertexOnCurve (historyID, vertexID)
 IsVertexOnCurve Parameters: In: historyID, vertexID Out: true/false
 
json WSM.Utils.MakePickRayFromWindow (firstWindowSelectPoint, secondWindowSelectPoint)
 MakePickRayFromWindow Parameters: In: firstWindowSelectPoint, secondWindowSelectPoint Out: PickRay
 
json WSM.Utils.MatchesSelectionType (selectedObjectIDs, aNewSelectedObjects, bSelectAll)
 MatchesSelectionType Parameters: In: selectedObjectIDs, aNewSelectedObjects, bSelectAll Out: true/false
 
json WSM.Utils.ObjectCanBeHidden (nHistoryID, nObjectID)
 ObjectCanBeHidden Parameters: In: nHistoryID, nObjectID Out: true/false
 
json WSM.Utils.PickBody (pickray)
 PickBody Parameters: In: pickRay Out: size_t
 
json WSM.Utils.PickGeometry (pickray, pickFilter, bAllowAdjustRayRadius)
 PickGeometry Parameters: In: pickray, pickVertices, pickEdges, pickFaces, pickInstances, bAllowAdjustRayRadius Out: size_t
 
json WSM.Utils.PickObjectsWithFilter (pickray, filter, currentSelectionLevel)
 PickObjectsWithFilter Parameters: In: pickray, filter, currentSelectionLevel Out: WSM.GroupInstancePath firstSelectedObject, std.vector<WSM.GroupInstancePath> allSelectedObjects, ObjectsAndPickPoints aObjectsAndPickPoints
 
json WSM.Utils.PickObjectsWithRay (pickray, pickFilter, bAllowAdjustRayRadius, bIgnoreInContext)
 PickObjectsWithRay Parameters: In: pickRay, pickFilter, bAllowAdjustRayRadius Out: ObjectIDsAndPickPoints aObjectsAndPickPoints
 
json WSM.Utils.RayFireWithObjects (objectIds, ray)
 RayFireWithObjects Parameters: In: objectIds, ray Out: bool, WSM.Point3d pickPointOnObject
 
json WSM.Utils.SelectionFromGroupInstancePathArray (aInput)
 SelectionFromGroupInstancePathArray Parameters: In: aInput Out: aOutput
 
json WSM.Utils.SelectionToGroupInstancePath (nObjectID)
 SelectionToGroupInstancePath Parameters: In: nObjectID Out: GroupInstancePath
 
json WSM.Utils.SelectionToGroupInstancePathArray (aInput)
 SelectionToGroupInstancePathArray Parameters: In: aInput Out: aOutput
 
json WSM.Utils.SetToOwnerBody (path)
 SetToOwnerBody Parameters: In: path Out: WSM.GroupInstancePath
 
json WSM.Utils.TestPickImages (nHistoryID, imageIds, pickRay)
 TestPickImages Parameters: In: nHistoryID, imageIds, pickRay Out: size_t, Point3d pickPointOnImage
 
json WSM.Utils.ObjectIDsAreEqual (id1, id2)
 ObjectIDsAreEqual Parameters: In: id1, id2 Out: areSame (bool)
 
json WSM.Utils.GroupInstancePathsAreEqual (path1, path2)
 GroupInstancePathsAreEqual Parameters: In: path1, path2 Out: areSame (bool)
 
json WSM.Utils.PickRay (pickrayLine, planes, screenPickRayRadius, perspectiveScaleFactor, baseRadius, normalizedScreenPoint)
 PickRay constructs a PickRay.
 
json WSM.Utils.PickRayFromLine (pickrayLine)
 PickRay constructs a PickRay.
 
json WSM.Utils.PickRayFromNormalizedScreenPoint (ptX, ptY, yUp)
 PickRayFromNormalizedScreenPoint() function.
 
json WSM.Utils.GroupInstancePathArray (objectIDs, History, groupInstancePath)
 
json WSM.Utils.GetGroupInstancePathFinalObjectHistoryID (ObjectIDs)
 GetGroupInstancePathFinalObjectHistoryID takes any form of Objects (GroupInstancePath, GroupInstancePathArray, ObjectHistoryIDArray, ObjectIDArray) and returns the final ObjectHistoryID.
 
json WSM.Utils.ObjectHistoryIDArray (objectIDs, History)
 
json WSM.Utils.ObjectIDArray (objectIDs)
 
json WSM.Utils.SetOrCreateStringAttributeForObject (nHistoryID, nObjectID, key, value, nCB, bIsSharedOnSplit)
 Sets the value of a string attribute of a given object, if that object has such an attribute with the given key.
 
json WSM.Utils.GetStringAttributeForObject (nHistoryID, nObjectID, key)
 Gets the string attribute value for a given object and key.
 
json WSM.Utils.ObjectTypeFilter ()
 Default constructor for WSM.Utils.ObjectTypeFilter
 
json WSM.Utils.ObjectHistoryID (nHistoryID, nObjectID)
 ObjectHistoryID creation method In: nHistoryID, nObjectID Out: ObjectHistoryID
 
json WSM.Utils.IsOwnerOf (parent, child)
 Checks whether parent is an owner of child Parameters: In: parent, child as WSM.GroupInstancePath Out: true/false
 
json WSM.Utils.GetAllGeometryInformation (nHistID, nObjID)
 Returns data to create a Spacemaker glb from a root history.
 
json WSM.Utils.GetAllRenderingInformation (nHistID, bWriteHiddenObject, bPushNonUniformOntoGeometry, nObjID)
 Returns rendering data used by Lumion.
 
json WSM.Utils.CreateModelFromRenderingInformation (nHistID, aMeshesAndTransformsDataVec, aMaterialVec)
 Creates geometry and materials representing rendering information.
 
json WSM.Utils.ComputeGeometryFromLevels (nHistID, bUseHiddenObject, nObjID)
 Computes faces by intersecting visible objects with levels.
 
json WSM.Utils.CreateAlignedAndCenteredGroup (nHistID, aObjectIDs)
 Creates a group matching the LCS and centered on average x, average y, and minimum z of the bounding boxes of the objects being moved to the group.
 
json WSM.Utils.CreateBoundingLineMesh (nHistoryID, nObjectID, aPlanes, bUsePlaneLinearly)
 Creates a line mesh boundary that is the intersection of the given planes and the object where the slice given by the the intersection of plane i and the object is bounded by plane (i - 1) and plane (i + 1), so only segments on the negative side of the planes are kept.
 
json WSM.Utils.GetObjectTypesMultiHistory (paths)
 Get object types for multiple object paths at once, in multiple histories.
 
json WSM.Utils.GetObjectTypes (historyId, objectIds)
 Bulk version of APIGetObjectTypeReadOnly.
 
json WSM.Utils.GetRenderableFaces (historyId, faces, calcTexCoords, backside)
 
json WSM.Utils.GetRenderableEdges (historyId, edges, includeSmooth)
 Get vertices for multiple edges at once, as a flat list of doubles
 
json WSM.Utils.GetObjectRenderableEdges (historyId, objectId, includeSmooth)
 Get vertices for all the edges on an object, as a flat list of doubles
 

Function Documentation

◆ AngleFullCircleInRadians()

json WSM.Utils.AngleFullCircleInRadians ( normal  ,
vecA  ,
vecB  ,
returnPositive   
)

AngleFullCircleInRadians Parameters: In: normal, vecA, vecB, returnPositive Out: double.

Parameters
[in]normalWSM.UnitVector3d
[in]vecAWSM.Vector3d
[in]vecBWSM.Vector3d
[in]returnPositivebool
Returns
{...}

◆ AppendSelectionToGroupInstancePathArray()

json WSM.Utils.AppendSelectionToGroupInstancePathArray ( aInput  ,
aOutput   
)

AppendSelectionToGroupInstancePathArray Parameters: In: aInput Out: std.vector<WSM.GroupInstancePath>

Parameters
[in]aInputWSM.Utils.HistoryObjects
[in]aOutput(OPTIONAL) Array of WSM.GroupInstancePath
Returns
aOutput

◆ AppendToGroupInstancePathArray()

json WSM.Utils.AppendToGroupInstancePathArray ( nHistoryID  ,
aInput  ,
aOutput   
)

AppendSelectionToGroupInstancePathArray Parameters: In: path, aInput Out: std.vector<WSM.GroupInstancePath>

Parameters
[in]nHistoryIDint
[in]aInputWSM.Utils.HistoryObjects
[in]aOutput(OPTIONAL) Array of WSM.GroupInstancePath
Returns
aOutput

◆ ComputeFaceCentroid()

json WSM.Utils.ComputeFaceCentroid ( historyID  ,
faceID   
)

ComputeFaceCentroid Parameters: In: historyID, faceID Out: success (bool), centroid (WSM.Point3d)

Parameters
[in]historyIDint
[in]faceIDint
Returns
{{ "success" , bRet}, { "centroid" , to_json(centroid)}};

◆ ComputeFaceNormal()

json WSM.Utils.ComputeFaceNormal ( historyID  ,
faceID   
)

ComputeFaceNormal Parameters: In: historyID, faceID Out: bool, WSM.UnitVector3d

Parameters
[in]historyIDint
[in]faceIDint
Returns
{{ "success" , bRet},{ "normal" , to_json(faceNormal)}};

◆ ComputeGeometryFromLevels()

json WSM.Utils.ComputeGeometryFromLevels ( nHistID  ,
bUseHiddenObject  ,
nObjID   
)

Computes faces by intersecting visible objects with levels.

Returns the faces in a vector with the height of the level the faces came from. If nObjID is WSM.INVALID_ID, uses every object in nHidtID, otherwise only uses the specified ID. Parameters: In: nHistID, bUseHiddenObject, nObjID Out: the data

Parameters
[in]nHistIDint
[in]bUseHiddenObject(OPTIONAL, default = false) bool
[in]nObjID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
aFaceDatasAtHeightVec

◆ ConvertToFaces()

json WSM.Utils.ConvertToFaces ( aPaths  )

ConvertToFaces Parameters: In: aPaths); Out: std.vector<WSM.GroupInstancePath>

Parameters
[in]aPathsWSM.Utils.HistoryObjects
Returns
aGroupInstancePaths

◆ ConvertToTopLevel()

json WSM.Utils.ConvertToTopLevel ( nHistoryID  ,
aObjectIDs  ,
bAllowInstances  ,
bAllowOwnedFaces   
)

ConverToTopLevel Parameters: In: nHistoryID, aObjectIDs, bAllowInstances Out: std.vector<size_t>

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]bAllowInstancesbool
[in]bAllowOwnedFacesbool
Returns
idArray

◆ ConvertToTopLevelPaths()

json WSM.Utils.ConvertToTopLevelPaths ( aPaths  ,
bAllowInstances  ,
bAllowOwnedFaces   
)

ConverToTopLevelPaths Parameters: In: aPaths, bAllowInstances Out: std.vector<WSM.GroupInstancePath>

Parameters
[in]aPathsWSM.Utils.HistoryObjects
[in]bAllowInstancesbool
[in]bAllowOwnedFacesbool
Returns
aGroupInstancePathArray

◆ CreateAlignedAndCenteredGroup()

json WSM.Utils.CreateAlignedAndCenteredGroup ( nHistID  ,
aObjectIDs   
)

Creates a group matching the LCS and centered on average x, average y, and minimum z of the bounding boxes of the objects being moved to the group.

Parameters: In: nHistID, aObjectIDs Out: the group ID

Parameters
[in]nHistIDint
[in]aObjectIDsArray of int
Returns
createdID

◆ CreateBoundingLineMesh()

json WSM.Utils.CreateBoundingLineMesh ( nHistoryID  ,
nObjectID  ,
aPlanes  ,
bUsePlaneLinearly   
)

Creates a line mesh boundary that is the intersection of the given planes and the object where the slice given by the the intersection of plane i and the object is bounded by plane (i - 1) and plane (i + 1), so only segments on the negative side of the planes are kept.

Note if i is from 0 to n, then the intersection of plane 0 and the object uses plane n and plane 1. Similarly the slice with plane n uses plane (n - 1) and plane 0. If bUsePlaneLinearly is true, aPlanes should have size that is a multiple of 3 and each segment will be determined by bounding the intersection of plane 3 * i with planes 3 * i + 1 and 3 * i + 2. Note we need bUsePlaneLinearly to handle more general cases like a single bounded segment and non-convex boundaries. Parameters: In: nHistoryID, nObjectID, aPlanes, bUsePlaneLinearly Out: the line mesh ID

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]aPlanesArray of WSM.Plane
[in]bUsePlaneLinearly(OPTIONAL, default = false) bool
Returns

◆ CreateModelFromRenderingInformation()

json WSM.Utils.CreateModelFromRenderingInformation ( nHistID  ,
aMeshesAndTransformsDataVec  ,
aMaterialVec   
)

Creates geometry and materials representing rendering information.

Parameters: In: nHistID, aMeshesAndTransformsDataVec, aMaterialVec Out: JSON_UNDEFINED

Parameters
[in]nHistIDint
[in]aMeshesAndTransformsDataVecArray of WSM.Utils.MeshesAndTransformsData
[in]aMaterialVecArray of WSM.Utils.MaterialData
Returns
JSON_UNDEFINED, i.e. {}

◆ DeleteObjectsIncludeSmoothAttachments()

json WSM.Utils.DeleteObjectsIncludeSmoothAttachments ( nHistoryID  ,
toDelete   
)

DeleteObjectsIncludeSmoothAttachments Parameters: In: nHistoryID, toDelete

Parameters
[in]nHistoryIDint
[in]toDeleteWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}

◆ ExpandSelection()

json WSM.Utils.ExpandSelection ( nHistoryID  ,
objectID  ,
selectionlevel  ,
filter  ,
bCanExpandInstances   
)

◆ GetAllGeometryInformation()

json WSM.Utils.GetAllGeometryInformation ( nHistID  ,
nObjID   
)

Returns data to create a Spacemaker glb from a root history.

If nObjID is provided and is not WSM.INVALID_ID, info returned is limited to the given object. Parameters: In: nHistID, nObjID Out: the data

Parameters
[in]nHistIDint
[in]nObjID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
jsonMeshesAndTransformsDataVec;

◆ GetAllNonOwnedGeometricObjects()

json WSM.Utils.GetAllNonOwnedGeometricObjects ( nHistoryID  )

GetAllNonOwnedGeometricObjects Parameters: In: nHistoryID Out: vector<size_t>

Parameters
[in]nHistoryIDint
Returns
{...}

◆ GetAllRenderingInformation()

json WSM.Utils.GetAllRenderingInformation ( nHistID  ,
bWriteHiddenObject  ,
bPushNonUniformOntoGeometry  ,
nObjID   
)

Returns rendering data used by Lumion.

If nObjID is provided and is not WSM.INVALID_ID, info returned is limited to the given object. Parameters: In: nHistID, bWriteHiddenObject, bPushNonUniformOntoGeometry, nObjID Out: the data

Parameters
[in]nHistIDint
[in]bWriteHiddenObject(OPTIONAL, default = false) bool
[in]bPushNonUniformOntoGeometry(OPTIONAL, default = false) bool
[in]nObjID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
{ { "MaterialVec" , to_json(aMaterialVec)}, { "MeshesAndTransformsDataVec" , to_json(aMeshesAndTransformsDataVec)} };

◆ GetAxisAlignedBoundingBox()

json WSM.Utils.GetAxisAlignedBoundingBox ( aObjectIDs  ,
CS   
)

GetAxisAlignedBoundingBox Parameters: In: aObjectIDs, CS (WSM.Utils.CoordSystem) WSM.Utils.CoordSystem.HCS The History being edited coordinate system.

WSM.Utils.CoordSystem.LCS The History being edited local coordinate system. WSM.Utils.CoordSystem.WHCS The World History coordinate system. WSM.Utils.CoordSystem.WLCS The World History local coordinate system. Out: AxisAlignedBoundingBox

Parameters
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]CSWSM.Utils.CoordSystem
Returns
{...}

◆ GetCoedgePoints()

json WSM.Utils.GetCoedgePoints ( nHistoryID  ,
coedgeID   
)

GetCoedgePoints Parameters: In: nHistoryID, coedgeID Out: bool, WSM.Point3d, WSM.Point3d

Parameters
[in]nHistoryIDint
[in]coedgeIDint
Returns
{{ "success" , to_json(bRet)}, { "begin" , to_json(begin)}, { "end" , to_json(end)}};

◆ GetEdgeCurveType()

json WSM.Utils.GetEdgeCurveType ( nHistoryID  ,
edgeId   
)

GetEdgeCurveType Parameters: In: nHistoryID, edgeId Out: type, size_t AttribID

Parameters
[in]nHistoryIDint
[in]edgeIdint
Returns
{{ "type" , to_json(nType)}, { "id" , to_json(attribID)}};

◆ GetEdgeIDFromCoedge()

json WSM.Utils.GetEdgeIDFromCoedge ( nHistoryID  ,
coedgeID   
)

GetEdgeIDFromCoedge Parameters: In: nHistoryID, coedgeID Out: size_t

Parameters
[in]nHistoryIDint
[in]coedgeIDint
Returns
{...}

◆ GetEdgeLine()

json WSM.Utils.GetEdgeLine ( nHistoryID  ,
edge   
)

GetEdgeLine Parameters: In: nHistoryID, edge Out: Line3d

Parameters
[in]nHistoryIDint
[in]edgeint
Returns
{...}

◆ GetFaceIDFromCoedge()

json WSM.Utils.GetFaceIDFromCoedge ( nHistoryID  ,
coedgeID   
)

GetFaceIDFromCoedge Parameters: In: nHistoryID, coedgeID Out: size_t

Parameters
[in]nHistoryIDint
[in]coedgeIDint
Returns
{...}

◆ GetFacePoints()

json WSM.Utils.GetFacePoints ( facePath  )

GetFacePoints Parameters: In: facePath Out: std.vector<WSM.Point3d>

Parameters
[in]facePathWSM.Utils.HistoryObjects
Returns
aPoints

◆ GetGroupInstanceNonOwnedGeometricObjects()

json WSM.Utils.GetGroupInstanceNonOwnedGeometricObjects ( instance  )

GetGroupInstanceNonOwnedGeometricObjects Parameters: In: instance Out: std.vector<WSM.GroupInstancePath>

Parameters
[in]instanceWSM.Utils.HistoryObjects
Returns
nonOwnedObjects

◆ GetGroupInstancePathFinalObjectHistoryID()

json WSM.Utils.GetGroupInstancePathFinalObjectHistoryID ( ObjectIDs  )

GetGroupInstancePathFinalObjectHistoryID takes any form of Objects (GroupInstancePath, GroupInstancePathArray, ObjectHistoryIDArray, ObjectIDArray) and returns the final ObjectHistoryID.

Parameters: In: ObjectIDs Out: Final ObjectHistoryID

Parameters
[in]ObjectIDsWSM.Utils.HistoryObjects
Returns
path.GetFinalObjectHistoryID()

◆ GetMemoryInfo()

json WSM.Utils.GetMemoryInfo ( nHistoryID  )

GetMemoryInfo Parameters: In: nHistoryID Out: aRefdHistoryIDs, nFullSize, nCollapsedSize

Parameters
[in]nHistoryIDint
Returns
{{ "histories" , to_json(aRefdHistoryIDs)}, { "nFullSize" , to_json(nFullSize)}, { "nCollapsedSize" , to_json(nCollapsedSize)}};

◆ GetObjectRenderableEdges()

json FormIt.Graphics.GetObjectRenderableEdges ( historyId  ,
objectId  ,
includeSmooth   
)

Get vertices for all the edges on an object, as a flat list of doubles

Parameters
[in]historyIdint
[in]objectIdint
[in]includeSmoothbool
Returns

◆ GetObjectTypes()

json FormIt.Graphics.GetObjectTypes ( historyId  ,
objectIds   
)

Bulk version of APIGetObjectTypeReadOnly.

If an object type can't be retrieved, then nUnSpecifiedType is set in outTypes. outTypes is always the same size and order as objectIds

Parameters
[in]historyIdint
[in]objectIdsArray of int
Returns
{ { "types" , to_json(types)} };

◆ GetObjectTypesMultiHistory()

json WSM.Utils.GetObjectTypesMultiHistory ( paths  )

Get object types for multiple object paths at once, in multiple histories.

Parameters
[in]pathsWSM.GroupInstancePathArray
Returns
{ { "types" , to_json(types)} };

◆ GetRenderableEdges()

json FormIt.Graphics.GetRenderableEdges ( historyId  ,
edges  ,
includeSmooth   
)

Get vertices for multiple edges at once, as a flat list of doubles

Parameters
[in]historyIdint
[in]edgesArray of int
[in]includeSmoothbool
Returns

◆ GetRenderableFaces()

json WSM.Utils.GetRenderableFaces ( historyId  ,
faces  ,
calcTexCoords  ,
backside   
)

◆ GetStringAttributeForObject()

json WSM.Utils.GetStringAttributeForObject ( nHistoryID  ,
nObjectID  ,
key   
)

Gets the string attribute value for a given object and key.

Returns true if the object has a string attribute with that key. Returns false if not.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]keyString
Returns
{{ "success" , to_json(success)}, { "value" , to_json(value)}};

◆ GetVertexCurveAttributes()

json WSM.Utils.GetVertexCurveAttributes ( historyID  ,
vertexID   
)

GetVertexCurveAttributes Parameters: In: historyID, vertexID Out: std.vector<std.pair<size_t, size_t>> aAttributeIDs

Parameters
[in]historyIDint
[in]vertexIDint
Returns
aAttributeIDs

◆ GroupInstancePathArray()

json WSM.Utils.GroupInstancePathArray ( objectIDs  ,
History  ,
groupInstancePath   
)

◆ GroupInstancePathsAreEqual()

json WSM.Utils.GroupInstancePathsAreEqual ( path1  ,
path2   
)

GroupInstancePathsAreEqual Parameters: In: path1, path2 Out: areSame (bool)

Parameters
[in]path1WSM.Utils.HistoryObjects
[in]path2WSM.Utils.HistoryObjects
Returns
path1 == path2

◆ HasSmoothEdge()

json WSM.Utils.HasSmoothEdge ( nHistoryID  ,
nObjectID   
)

HasSmoothEdge Parameters: In: nHistoryID, nObjectID Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ IsBackFace()

json WSM.Utils.IsBackFace ( path  ,
cameraPos  ,
cameraDir  ,
perspectiveView   
)

IsBackFace Parameters: In: path, cameraPos, cameraDir, perspectiveView Out: true/false

Parameters
[in]pathWSM.Utils.HistoryObjects
[in]cameraPosWSM.Point3d
[in]cameraDirWSM.Vector3d
[in]perspectiveViewbool
Returns
{...}

◆ IsLayerHidden()

json WSM.Utils.IsLayerHidden ( nHistoryID  ,
id   
)

IsLayerHidden Parameters: In: nHistoryID, id Out: true/false

Parameters
[in]nHistoryIDint
[in]idint
Returns
{...}

◆ IsLayerNotPickable()

json WSM.Utils.IsLayerNotPickable ( nHistoryID  ,
id   
)

IsLayerNotPickable Parameters: In: nHistoryID, id Out: true/false

Parameters
[in]nHistoryIDint
[in]idint
Returns
{...}

◆ IsObjectHidden()

json WSM.Utils.IsObjectHidden ( nHistoryID  ,
nObjectID   
)

IsObjectHidden Parameters: In: nHistoryID, nObjectID Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ IsObjectHiddenByPath()

json WSM.Utils.IsObjectHiddenByPath ( path  )

IsObjectHiddenByPath Parameters: In: path Out: true/false

Parameters
[in]pathWSM.Utils.HistoryObjects
Returns
{...}

◆ IsObjectNotPickable()

json WSM.Utils.IsObjectNotPickable ( nHistoryID  ,
nObjectID   
)

IsObjectNotPickable Parameters: In: nHistoryID, nObjectID Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ IsObjectNotPickableByPath()

json WSM.Utils.IsObjectNotPickableByPath ( path  )

IsObjectNotPickableByPath Parameters: In: path Out: true/false

Parameters
[in]pathWSM.Utils.HistoryObjects
Returns
{...}

◆ IsObjectType()

json WSM.Utils.IsObjectType ( path  ,
nObjectTypes   
)

IsObjectType Parameters: In: path, nObjectTypes Out: bool

Parameters
[in]pathWSM.Utils.HistoryObjects
[in]nObjectTypesArray of WSM.nObjectType
Returns
{...}

◆ IsOnCurveJunction()

json WSM.Utils.IsOnCurveJunction ( path  ,
bInferencing   
)

◆ IsOwnerOf()

json WSM.Utils.IsOwnerOf ( parent  ,
child   
)

Checks whether parent is an owner of child Parameters: In: parent, child as WSM.GroupInstancePath Out: true/false

Parameters
[in]parentWSM.GroupInstancePath
[in]childWSM.GroupInstancePath
Returns
{...}

◆ IsSelectAllConnected()

json WSM.Utils.IsSelectAllConnected ( nHistoryID  ,
selectedObjectIDs   
)

IsSelectAllConnected Parameters: In: nHistoryID, selectedObjectIDs Out: true/false

Parameters
[in]nHistoryIDint
[in]selectedObjectIDsWSM.Utils.HistoryObjects
Returns
{...}

◆ IsSilhouetteEdge()

json WSM.Utils.IsSilhouetteEdge ( nHistoryID  ,
edgeId  ,
cameraPos  ,
cameraDir  ,
perspectiveView   
)

IsSilhouetteEdge Parameters: In: nHistoryID, edgeId, cameraPos, cameraDir, perspectiveView Out: true/false

Parameters
[in]nHistoryIDint
[in]edgeIdint
[in]cameraPosWSM.Point3d
[in]cameraDirWSM.Vector3d
[in]perspectiveViewbool
Returns
{...}

◆ IsSmooth()

json WSM.Utils.IsSmooth ( path  )

IsSmooth Parameters: In: path Out: true/false

Parameters
[in]pathWSM.Utils.HistoryObjects
Returns
{...}

◆ IsTopLevelObjectHidden()

json WSM.Utils.IsTopLevelObjectHidden ( nHistoryID  ,
nObjectID   
)

IsTopLevelObjectHidden Parameters: In: path Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ IsTopLevelObjectHiddenByPath()

json WSM.Utils.IsTopLevelObjectHiddenByPath ( path  )

IsTopLevelObjectHiddenByPath Parameters: In: path Out: true/false

Parameters
[in]pathWSM.Utils.HistoryObjects
Returns
{...}

◆ IsVertexEditable()

json WSM.Utils.IsVertexEditable ( nHistoryID  ,
nObjectID   
)

IsVertexEditable Parameters: In: nHistoryID, nObjectID Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ IsVertexOnCurve()

json WSM.Utils.IsVertexOnCurve ( historyID  ,
vertexID   
)

IsVertexOnCurve Parameters: In: historyID, vertexID Out: true/false

Parameters
[in]historyIDint
[in]vertexIDint
Returns
{...}

◆ MakePickRayFromWindow()

json WSM.Utils.MakePickRayFromWindow ( firstWindowSelectPoint  ,
secondWindowSelectPoint   
)

MakePickRayFromWindow Parameters: In: firstWindowSelectPoint, secondWindowSelectPoint Out: PickRay

Parameters
[in]firstWindowSelectPointWSM.Point2d
[in]secondWindowSelectPointWSM.Point2d
Returns
WSM.Utils.PickRay{ firstWindowSelectPoint, secondWindowSelectPoint}

◆ MatchesSelectionType()

json WSM.Utils.MatchesSelectionType ( selectedObjectIDs  ,
aNewSelectedObjects  ,
bSelectAll   
)

MatchesSelectionType Parameters: In: selectedObjectIDs, aNewSelectedObjects, bSelectAll Out: true/false

Parameters
[in]selectedObjectIDsWSM.Utils.HistoryObjects
[in]aNewSelectedObjectsWSM.Utils.HistoryObjects
[in]bSelectAllbool
Returns
{...}

◆ ObjectCanBeHidden()

json WSM.Utils.ObjectCanBeHidden ( nHistoryID  ,
nObjectID   
)

ObjectCanBeHidden Parameters: In: nHistoryID, nObjectID Out: true/false

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

◆ ObjectHistoryID()

json WSM.Utils.ObjectHistoryID ( nHistoryID  ,
nObjectID   
)

ObjectHistoryID creation method In: nHistoryID, nObjectID Out: ObjectHistoryID

ObjectHistoryID constructs an ObjectHistoryID.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{...}

Parameters: In: nHistoryID, nObjectID Out: ObjectHistoryID

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
objectHistoryID

◆ ObjectHistoryIDArray()

json WSM.Utils.ObjectHistoryIDArray ( objectIDs  ,
History   
)

◆ ObjectIDArray()

json WSM.Utils.ObjectIDArray ( objectIDs  )

◆ ObjectIDsAreEqual()

json WSM.Utils.ObjectIDsAreEqual ( id1  ,
id2   
)

ObjectIDsAreEqual Parameters: In: id1, id2 Out: areSame (bool)

Parameters
[in]id1WSM.ObjectHistoryID
[in]id2WSM.ObjectHistoryID
Returns
id1 == id2

◆ ObjectTypeFilter()

json WSM.Utils.ObjectTypeFilter ( )

Default constructor for WSM.Utils.ObjectTypeFilter

Returns
filter

◆ PickBody()

json WSM.Utils.PickBody ( pickray  )

PickBody Parameters: In: pickRay Out: size_t

Parameters
[in]pickrayWSM.Utils.PickRay
Returns
{...}

◆ PickGeometry()

json WSM.Utils.PickGeometry ( pickray  ,
pickFilter  ,
bAllowAdjustRayRadius   
)

PickGeometry Parameters: In: pickray, pickVertices, pickEdges, pickFaces, pickInstances, bAllowAdjustRayRadius Out: size_t

Parameters
[in]pickrayWSM.Utils.PickRay
[in]pickFilterWSM.Utils.ObjectTypeFilter
[in]bAllowAdjustRayRadiusbool
Returns
{...}

◆ PickObjectsWithFilter()

json WSM.Utils.PickObjectsWithFilter ( pickray  ,
filter  ,
currentSelectionLevel   
)

PickObjectsWithFilter Parameters: In: pickray, filter, currentSelectionLevel Out: WSM.GroupInstancePath firstSelectedObject, std.vector<WSM.GroupInstancePath> allSelectedObjects, ObjectsAndPickPoints aObjectsAndPickPoints

Parameters
[in]pickrayWSM.Utils.PickRay
[in]filterWSM.Utils.ObjectTypeFilter
[in]currentSelectionLevelSelectionLevel
Returns
{{ "firstSelectedObject" , to_json(firstSelectedObject)}, { "allSelectedObjects" , to_json(allSelectedObjects)}, { "aObjectsAndPickPoints" , to_json(aObjectsAndPickPoints)}};

◆ PickObjectsWithRay()

json WSM.Utils.PickObjectsWithRay ( pickray  ,
pickFilter  ,
bAllowAdjustRayRadius  ,
bIgnoreInContext   
)

PickObjectsWithRay Parameters: In: pickRay, pickFilter, bAllowAdjustRayRadius Out: ObjectIDsAndPickPoints aObjectsAndPickPoints

Parameters
[in]pickrayWSM.Utils.PickRay
[in]pickFilterWSM.Utils.ObjectTypeFilter
[in]bAllowAdjustRayRadiusbool
[in]bIgnoreInContextbool
Returns
aObjectsAndPickPoints

◆ PickRay()

json WSM.Utils.PickRay ( pickrayLine  ,
planes  ,
screenPickRayRadius  ,
perspectiveScaleFactor  ,
baseRadius  ,
normalizedScreenPoint   
)

PickRay constructs a PickRay.

Parameters: In: pickrayLine, planes, screenPickRayRadius, perspectiveScaleFactor, baseRadius, normalizedScreenPoint Out: PickRay

Parameters
[in]pickrayLineWSM.Line3d
[in]planesArray of WSM.Plane
[in]screenPickRayRadiusdouble
[in]perspectiveScaleFactordouble
[in]baseRadiusdouble
[in]normalizedScreenPoint(OPTIONAL, default = WSM.Point2d()) WSM.Point2d
Returns
pickRay

◆ PickRayFromLine()

json WSM.Utils.PickRayFromLine ( pickrayLine  )

PickRay constructs a PickRay.

Expose a different constructor than just PickRay above Parameters: In: pickrayLine Out: PickRay

Parameters
[in]pickrayLineWSM.Line3d
Returns
pickRay

◆ PickRayFromNormalizedScreenPoint()

json WSM.Utils.PickRayFromNormalizedScreenPoint ( ptX  ,
ptY  ,
yUp   
)

PickRayFromNormalizedScreenPoint() function.

Parameters
[in]ptXdouble
[in]ptYdouble
[in]yUp(OPTIONAL, default = false) bool
Returns
pickRay

◆ RayFireWithObjects()

json WSM.Utils.RayFireWithObjects ( objectIds  ,
ray   
)

RayFireWithObjects Parameters: In: objectIds, ray Out: bool, WSM.Point3d pickPointOnObject

Parameters
[in]objectIdsWSM.Utils.HistoryObjects
[in]rayWSM.Utils.PickRay
Returns
{{ "success" , to_json(bRet)}, { "point" , to_json(pickPointOnObject)}};

◆ SelectionFromGroupInstancePathArray()

json WSM.Utils.SelectionFromGroupInstancePathArray ( aInput  )

SelectionFromGroupInstancePathArray Parameters: In: aInput Out: aOutput

Parameters
[in]aInputWSM.Utils.HistoryObjects
Returns
aOutput

◆ SelectionToGroupInstancePath()

json WSM.Utils.SelectionToGroupInstancePath ( nObjectID  )

SelectionToGroupInstancePath Parameters: In: nObjectID Out: GroupInstancePath

Parameters
[in]nObjectIDint
Returns
{...}

◆ SelectionToGroupInstancePathArray()

json WSM.Utils.SelectionToGroupInstancePathArray ( aInput  )

SelectionToGroupInstancePathArray Parameters: In: aInput Out: aOutput

Parameters
[in]aInputWSM.Utils.HistoryObjects
Returns
aOutput

◆ SetOrCreateStringAttributeForObject()

json WSM.Utils.SetOrCreateStringAttributeForObject ( nHistoryID  ,
nObjectID  ,
key  ,
value  ,
nCB  ,
bIsSharedOnSplit   
)

Sets the value of a string attribute of a given object, if that object has such an attribute with the given key.

Otherwise it creates the attribute first. The copy behavior and bIsSharedOnSplit flag are only used when the attribute is created. Returns true if successful, false otherwise. If ObjectID is WSM.INVALID_ID, the attribute is created on the History. In : HistoryID, ObjectID, key, value, copy behavior, shared flag

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]keyString
[in]valueString
[in]nCB(OPTIONAL, default = ( int )WSM.nCopyBehavior.nShareOrCopy) int
[in]bIsSharedOnSplit(OPTIONAL, default = true) bool
Returns
success

◆ SetToOwnerBody()

json WSM.Utils.SetToOwnerBody ( path  )

SetToOwnerBody Parameters: In: path Out: WSM.GroupInstancePath

Parameters
[in]pathWSM.Utils.HistoryObjects
Returns
path2

◆ TestPickImages()

json WSM.Utils.TestPickImages ( nHistoryID  ,
imageIds  ,
pickRay   
)

TestPickImages Parameters: In: nHistoryID, imageIds, pickRay Out: size_t, Point3d pickPointOnImage

Parameters
[in]nHistoryIDint
[in]imageIdsWSM.Utils.HistoryObjects
[in]pickRayWSM.Utils.PickRay
Returns
{{ "id" , to_json( id )}, { "point" , to_json(pickPointOnImage)}};