FormIt Plugin API  v23.0.0 (2023.0.0)
WSM API

Description

Modules

 WSM.AppHelper API
 
 WSM.InferenceEngine API
 
 WSM.Atf API
 
 WSM.Geom API
 
 WSM.GroupInstancePath API
 
 WSM.Interval3d API
 
 WSM.Line3d API
 
 WSM.Plane API
 
 WSM.Point3d API
 
 WSM.RenderHelper API
 
 WSM.Sat API
 
 WSM.Skup API
 
 WSM.Tools API
 
 WSM.Transf3d API
 
 WSM.UnitVector3d API
 
 WSM.Utils API
 
 WSM.Vector3d API
 

Namespaces

 WSM.AppHelper
 WSM.AppHelper namespace.
 
 WSM.InferenceEngine
 WSM.InferenceEngine namespace.
 
 WSM.Atf
 WSM.Atf namespace.
 
 WSM.Geom
 WSM.Geom namespace.
 
 WSM.GroupInstancePath
 WSM.GroupInstancePath namespace.
 
 WSM.Interval3d
 WSM.Interval3d namespace.
 
 WSM.Line3d
 WSM.Line3d namespace.
 
 WSM.Plane
 WSM.Plane namespace.
 
 WSM.Point3d
 WSM.Point3d namespace.
 
 WSM.RenderHelper
 WSM.RenderHelper namespace.
 
 WSM.Sat
 WSM.Sat namespace.
 
 WSM.Skup
 WSM.Skup namespace.
 
 WSM.Tools
 WSM.Tools namespace.
 
 WSM.Transf3d
 WSM.Transf3d namespace.
 
 WSM.UnitVector3d
 WSM.UnitVector3d namespace.
 
 WSM.Utils
 WSM.Utils namespace.
 
 WSM.Vector3d
 WSM.Vector3d namespace.
 

Functions

json WSM.APIGetActiveHistory ()
 Get the Active history managed by ScriptInstance. More...
 
json WSM.APICreateHistory (nHistoryID, bNonTemporary)
 APICreateHistory() function. More...
 
json WSM.APIChangeHistoryID (nHistoryID)
 APIChangeHistoryID() function. More...
 
json WSM.APIDeleteHistory (nHistoryID)
 Delete the given History and also the active history managed by ScriptInstance. More...
 
json WSM.APIDeleteAllHistories ()
 Delete all Histories and reset next History Id to be 0. More...
 
json WSM.APIGetAllHistoriesReadOnly (bWithTemporary)
 APIGetAllHistoriesReadOnly Gets the IDs of all active histories, optionally with temporary ones. More...
 
json WSM.APIGetAllReachableHistoriesReadOnly (nHistoryID, bGoUp)
 Gets all the Histories reachable from the given History going either up or down the chain of Histories based on the flag bGoUp. More...
 
json WSM.APIUndoHistory (nHistoryID, bAndDeleteRedo, nApplyOnDeltaID)
 APIUndoHistory undoes History. More...
 
json WSM.APIRedoHistory (nHistoryID, nApplyOnDeltaID)
 APIRedoHistory redoes History. More...
 
json WSM.APIUndoHistoryToDelta (nHistoryID, nDeltaID)
 APIUndoHistoryToDelta undoes History. More...
 
json WSM.APIRedoHistoryToDelta (nHistoryID, nDeltaID)
 APIRedoHistoryToDelta redoes History. More...
 
json WSM.APIDeleteAllRedoHistory (nHistoryID, bReuseDiscardedObjectIDs)
 APIDeleteAllRedoHistory - Deletes all forward Deltas. More...
 
json WSM.APICanUndoHistoryReadOnly (nHistoryID)
 APICanUndoHistoryReadOnly true if undo is possible. More...
 
json WSM.APICanRedoHistoryReadOnly (nHistoryID)
 APICanRedoHistoryReadOnly true if redo is possible. More...
 
json WSM.APICanUndoHistoryToDeltaReadOnly (nHistoryID, nDeltaID)
 APICanUndoHistoryToDeltaReadOnly true if undo is possible. More...
 
json WSM.APICanRedoHistoryToDeltaReadOnly (nHistoryID, nDeltaID)
 APICanRedoHistoryToDeltaReadOnly true if redo is possible. More...
 
json WSM.APIUndoOrRedoHistoryToDelta (nHistoryID, nDeltaID, bAndDeleteRedo)
 Step backward or forward until the given Delta is reached. More...
 
json WSM.APIGetAllHistoryDeltasReadOnly (nHistoryID)
 Get the IDs of all deltas in the given history. More...
 
json WSM.APIGetHistoryDeltasReadOnly (nHistoryID, nStartDeltaID, nEndDeltaID)
 Get the IDs of the deltas in the given closed range in the given history. More...
 
json WSM.APIMergeDeltas (nHistoryID, nStartDeltaID, nEndDeltaID, bReuseDiscardedObjectIDs)
 APIMergeDeltas merges the specified Delta range. More...
 
json WSM.APIReverseFaces (nHistoryID, aFaceIDs)
 APIReverseFaces Parameters: In: nHistoryID, aFaceIDs Out: JSON_UNDEFINED;. More...
 
json WSM.APICheckValidityReadOnly (nHistoryID, nObjectID)
 Finds all errors on the Object. More...
 
json WSM.APICheckHistoryValidityReadOnly (nHistoryID)
 Finds all errors in the History (including on every live Object in the History). More...
 
json WSM.APIComputeAreaReadOnly (nHistoryID, nObjectID, transf)
 Computes the surface area of the Object. More...
 
json WSM.APIComputeVolumeReadOnly (nHistoryID, nObjectID, transf)
 Computes the volume of the Object. More...
 
json WSM.APICopyObject (nHistoryID, nToHistoryID, nObjectID)
 APICopyObject copies nObjectID in nHistoryID to nToHistoryID. More...
 
json WSM.APIDragFace (nHistoryID, nObjectID, nDistance, bMerge)
 APIDragFace drags a face nObjectID along it normal by nDistance. More...
 
json WSM.APIDragFaces (nHistoryID, aaFaceIDs, aDists, aDirs, bMerge)
 APIDragFaces drags a group of faces aaFaceIDs by aDistance for each group. More...
 
json WSM.APIScaleFace (nHistoryID, nFaceID, aScaleFactor)
 Scales a Face by given scale factor, around its centroid. More...
 
json WSM.APISetObjectProperties (nHistoryID, nObjectID, sObjectName, bReportAreaByLevel, aDefaultLevelIDs)
 Sets the properties of a given object (Body): A name and if that particular body reports its area by level or not. More...
 
json WSM.APIOffsetFace (nHistoryID, nFaceID, dOffsetDistance, bOffsetHolesToo, trans, bReadOnly)
 APIOffsetFace offsets a copy of the boundary a face by given distance. More...
 
json WSM.APITaperFace (nHistoryID, nFaceID, dRadians, axis)
 Taper a Face by angle around the given axis The angle of rotation is a radian from -PI/2 to PI/2 The angle of rotation is relative to the direction of the axis and the normal of the face. More...
 
json WSM.APIRotateFace (nHistoryID, nFaceID, aRadian)
 APIRotateFace rotates face by given radian using default rotation axis. More...
 
json WSM.APIRotateFaceBetweenPoints (nHistoryID, nFaceID, startPt, endPt)
 Rotates a Face between two given points Both points are projected into the face plane The angle of rotation is a radian from 0 to 2PI, determined by the angle counterclockwise from Vector(startPt-faceCenter) to Vector(endPt-faceCenter), with normal as the face's normal Parameters: In: nHistoryID, nFaceID, startPt, endPt Out: JSON_UNDEFINED;. More...
 
json WSM.APIMergeBody (nHistoryID, nBodyID, dSmoothCosAngle)
 Merges all the merge-able Edges and Vertices out of a Body. More...
 
json WSM.APICreateBlock (nHistoryID, point3d1, point3d2)
 Create a block with the given corners. More...
 
json WSM.APICreateCircleOrArc (nHistoryID, radius, posCenter, xAxis, yAxis, dStartParam, dEndParam, accuracyORcount, bReadOnly, trans, nMinimumNumberOfFacets)
 Create a circle or arc defined by C(t) = posCenter + radius * (xAxis * cos(t) + yAxis * sin(t)) where t goes from dStartParam to dEndParam Parameter accuracyORcount means: MAX distance between base circle and segment as portion of R, if < .75 number of divisions (double rounded to int) over 90 degree arc, if >= .75 Parameters: In: nHistoryID , radius, posCenter, xAxis, yAxis, dStartParam, dEndParam, accuracyORcount, trans, nMinimumNumberOfFacets Out: nObjectID. More...
 
json WSM.APICreateCircleOrArcFromPoints (nHistoryID, arcStartPos, arcEndPos, thirdPoint, accuracyORcount, bReadOnly, trans, nMinimumNumberOfFacets, bCircle)
 Create a circle or arc defined by points Parameter accuracyORcount means: MAX distance between base circle and segment as portion of R, if < .75 number of divisions (double rounded to int) over 90 degree arc, if >= .75 Parameters: In: nHistoryID, arcStartPos, arcEndPos, thirdPoint, accuracyORcount, bReadOnly, trans, nMinimumNumberOfFacets, bCircle Out: The created vector of points. More...
 
json WSM.APICreateHermiteSpline (nHistoryID, aControlPoints, bClosed, startTangent, endTangent, bReadOnly)
 Tessellate a cubic spline that touches all aControlPoints Fills the tessellated points into aOutPoints bClosed specifies that the end point is the start point, so the curve must be smooth and closed startTangent is an optional Vector that specifies the tangent at the start point endTangent is an option Vector that specifies the tangent at the end point bReadOnly, if true does not put geometry into the scene, only returns the tessellated points. More...
 
json WSM.APICreateClampedHermiteSplineDataReadOnly (nHistoryID, aControlPoints, startTangent, endTangent, bClosed, aVertexIDsOnSpline, nNumberOfNewContolPoints)
 
json WSM.APICreateRectangle (nHistoryID, firstEdgePt1, firstEdgePt2, projectionPt, bReadOnly)
 Create a rectangle based on one edge and a third point. More...
 
json WSM.APICreateHemisphere (nHistoryID, nRadius, centerPt, nAccuracyORcount)
 Create a hemisphere with the radius and at the given center point. More...
 
json WSM.APICreateCone (nHistoryID, nRadius, nHeight, centerPt, nAccuracyORcount)
 Create a cone (above Z=0) with given parameters. More...
 
json WSM.APISweep (nHistoryID, aProfile, aPath, bRemoveUnusedProfileAndPath)
 APISweep creates a sweep from profile and path from Objects in GroupInstancePaths in nHistoryID. More...
 
json WSM.APIOffset3d (nHistoryID, nObjectID, dDistance)
 APIOffset3d offsets all the Faces in the given Object by the amount specified. More...
 
json WSM.APIShell (nHistoryID, nBodyID, dDistance, aOpenFaceIDs)
 APIShell shells the given Body by the specified distance. More...
 
json WSM.APIBlend (nHistoryID, dRadius, aPathIDs, accuracyORcount, nMinimumNumberOfFacets)
 APIBlend creates a blend surface using the specified path. More...
 
json WSM.APIOffsetEdges (nHistoryID, nEdgeIDs, dOffsetDistance, trans, bReadOnly)
 APIOffsetEdges offsets Edges by given distance. More...
 
json WSM.APICover (nHistoryID, aEdgeIDs, bMerge)
 APICover makes Faces the cover a closed circuit of Edges. More...
 
json WSM.APILoft (nHistoryID, aaProfileIDs, bDeleteInteriorProfileFaces)
 APILoft makes Faces that connect a vector of profiles. More...
 
json WSM.APIExtrudeEdges (nHistoryID, aProfileIDs, t)
 APIExtrudeEdges makes a Face from the given profile and a transformed copy of the edges. More...
 
json WSM.APILoadAXMFile (nHistoryID, sFilePath, isImport, logOutputPath)
 Load an AXM file, both pre WSM and current. More...
 
json WSM.APILoadMaterialsFromAXMFile (nHistoryID, sFilePath)
 Load only materials and their textures from an AXM file into the given history. More...
 
json WSM.APISaveToAXMFileReadOnly (nHistoryID, aObjectIDs, sFilePath, aPreviewImage, bWithChildren)
 Saves Objects to an AXM file. More...
 
json WSM.APILoadFromFile (nHistoryID, sFilePath, eFileType, nOptions, dMaxDistanceFromOrigin, dScaleFactor)
 APILoadFromFile Parameters: In: nHistoryID, sFilePath, eFileType, nOptions, dMaxDistanceFromOrigin, dScaleFactor Out: iObjectIdOffset. More...
 
json WSM.APILoadFromFacets (nHistoryID, facetsData, nOptions, dMaxDistanceFromOrigin, dRemoveDuplicateTol)
 Parameters: In: nHistoryID, facetsData, nOptions, dMaxDistanceFromOrigin, dRemoveDuplicateTol Out: IDs of created objects. More...
 
json WSM.APISaveLastDeltaToBinaryFile (nHistoryID, sFilePath)
 Save last Delta and all changed Objects to a binary file. More...
 
json WSM.APISaveDeltaToBinaryStringReadOnly (nHistoryID, nDeltaID)
 APISaveDeltaToBinaryStringReadOnly Parameters: In: nHistoryID, [nDeltaID] Out: base64Str, deltaID. More...
 
json WSM.APIGetLastDeltaIDReadOnly (nHistoryID, nBeforeLast)
 Get the ID of the target Delta, which is nBeforeLast before the last Delta (even for zero nBeforeLast, it may be different from the active Delta ID, if there are available Redo states). More...
 
json WSM.APISaveDeltaToSolidDefReadOnly (nHistoryID, bForUndo)
 Gets the changed, created, and deleted objects in the most recent delta and encodes this information in a solid-def JSON string so that solid-def stored in HFDM can be kept up to date. More...
 
json WSM.APIAddSolidDefGuids (nHistoryID, aObjectIDs)
 APIAddSolidDefGuids: Adds solid-def guids in StringAttributes to the given Objects. More...
 
json WSM.APILoadDeltaFromBinaryString (nHistoryID, base64Str, nDeltaID, base64encoded)
 APILoadDeltaFromBinaryString Parameters: In: nHistoryID, base64Str, [nDeltaID, [base64encoded]] Out: nDeltaID. More...
 
json WSM.APISaveToFileReadOnly (nHistoryID, aObjectIDs, sFilePath, eFileType, bWithChildren, dExportScale, aExcludedObjects, aLayerDisplayedNegateVec)
 Save Objects to a file of the specified type. More...
 
json WSM.APISaveAllActiveObjectsToBinaryFileReadOnly (nHistoryID, sFilePath)
 Save all active Objects to a binary file. More...
 
json WSM.APISaveHistoryToBinaryFileReadOnly (nHistoryID, sFilePath, aLayerDisplayedNegateVec)
 Save the whole history (with all undo states) to a binary file. More...
 
json WSM.APISaveHistoryToBinaryStringReadOnly (nHistoryID, bBase64Encode, aLayerDisplayedNegateVec)
 Save the whole history (with all undo states) to a binary string. More...
 
json WSM.APISaveToStringReadOnly (nHistoryID, aObjectIDs, bWithChildren, aExcludedObjects, aLayerDisplayedNegateVec, eFileType)
 Save Objects to a string. More...
 
json WSM.APILoadFromString (nHistoryID, saveString, eFileType, nOptions, dMaxDistanceFromOrigin, dScaleFactor)
 Load a model from a string containing serialization of one of the supported types. More...
 
json WSM.APILoadHistoryFromBinaryString (nHistoryID, base64Str, base64encoded)
 Load the whole history (with all undo states) from an, optionally base64 encoded, string and add to to an empty History. More...
 
json WSM.APILoadDeltaFromBinaryFile (nHistoryID, sFilePath)
 Load Delta from a binary file and add it to the History. More...
 
json WSM.APICreatePolyline (nHistoryID, aPoint3ds, bForceClosed)
 Creates a polyline using 3D sketching not linking with existing topology. More...
 
json WSM.APICreateExtrusion (nHistoryID, aPoint3ds, dist)
 Create an extrusion on the given History. More...
 
json WSM.APICreateCylinder (nHistoryID, aPosCenter, aRadius, aHeight, aAccuracyORcount, aAxis)
 Create a cylinder on the given History. More...
 
json WSM.APIGetBodyFacesReadOnly (nHistoryID, nObjectID)
 GetBodyFacesReadOnly returns an array of Face IDs. More...
 
json WSM.APIRegisterProgressCallbacksReadOnly (startCbkStr, progressCbkStr, finishCbkStr, progressIncrement, progressStart, progressEnd)
 Register API progress callback. More...
 
json WSM.APIGetTopLevelOwnersReadOnly (nHistoryID, nObjectID)
 APIGetTopLevelOwnersReadOnly returns the top level owners of the given Object. More...
 
json WSM.APIGetObjectsByTypeReadOnly (nHistoryID, nObjectID, nType, bUpstream)
 Returns all the objects of type 'nType' contained by the Object the given nObjectID if bUpstream is false; otherwise, return all the objects of type "nType" which are the parents of given object. More...
 
json WSM.APIGetAllObjectsByTypeReadOnly (nHistoryID, nType)
 Returns all the objects of type 'nType' contained by the history Parameters: In: nHistoryID, nType nType- WSM.nObjectType.nUnSpecifiedType WSM.nObjectType.nBodyType WSM.nObjectType.nLumpType WSM.nObjectType.nShellType WSM.nObjectType.nFaceType WSM.nObjectType.nLoopType WSM.nObjectType.nCoedgeType WSM.nObjectType.nEdgeType WSM.nObjectType.nVertexType Out: Array of Object IDs of the given nType. More...
 
json WSM.APIGetObjectTypeReadOnly (nHistoryID, nObjectID)
 APIGetObjectTypeReadOnly returns an object type. More...
 
json WSM.APIGetObjectNameReadOnly (nHistoryID, nObjectID)
 APIGetObjectNameReadOnly returns an object type. More...
 
json WSM.APIGetObjectPropertiesReadOnly (nHistoryID, nObjectID)
 Gets the properties of a given object (Body): A name and if that particular body reports its area by level or not Parameters: In: nHistoryID, nObjectID, Out: sObjectName, bReportAreaByLevel. More...
 
json WSM.APIGetCreatedChangedAndDeletedInActiveDeltaReadOnly (nHistoryID, nObjectType, bForUndo)
 APIGetCreatedChangedAndDeletedInActiveDeltaReadOnly Parameters: In: History ID, WSM.nObjectType nObjectType, bool bForUndo Out: Vector of Created, Vector of Changed, Vector of Deleted,. More...
 
json WSM.APIGetCreatedChangedAndDeletedInDeltaRangeReadOnly (nHistoryID, nStartDelta, nEndDelta, aObjectTypes)
 APIGetCreatedChangedAndDeletedInDeltaRangeReadOnly Parameters: In: History ID, first Delta ID, second Delta ID, nObjectTypes Out: Vector of Created, Vector of Changed, Vector of Deleted,. More...
 
json WSM.APIGetEdgeOrVertexMarkedSmoothReadOnly (nHistoryID, nObjectID)
 GetEdgeMarkedSmoothReadOnly Returns whether an edge is marked as smooth. More...
 
json WSM.APISetEdgesOrVerticesMarkedSmooth (nHistoryID, aObjectIDs, bSmooth)
 SetEdgesOrVerticesMarkedSmooth Marks all of aObjectIDs' smoothness. More...
 
json WSM.APIIsEdgeSilhouetteReadOnly (nHistoryID, nEdgeID, cameraPos, cameraDir, bPerspectiveView)
 APIIsEdgeSilhouetteReadOnly Returns whether an edge is a silhouette. More...
 
json WSM.APIDetectSilhouettesReadOnly (nHistoryID, nEdgeIDs, cameraPos, cameraDir, bPerspectiveView, bSmoothOnly)
 APIDetectSilhouettesReadOnly Returns a list of silhouette edges from a list of edges. More...
 
json WSM.APIDetectFreeEdgesReadOnly (nHistoryID, nEdgeIDs)
 APIDetectFreeEdgesReadOnly Returns a list of edges that have only one or zero faces connected and a list of non free edges. More...
 
json WSM.APIIsEdgeManifoldReadOnly (nHistoryID, nEdgeID)
 Returns whether an edge has exactly two coedges on two distinct faces. More...
 
json WSM.APIGetFacePlaneReadOnly (nHistoryID, nFaceID)
 GetFacePlaneReadOnly returns the plane of nFaceID. More...
 
json WSM.APIGetFaceCentroidPoint3dReadOnly (nHistoryID, nFaceID)
 APIGetFaceCentroidPoint3dReadOnly returns the centroid point of nFaceID. More...
 
json WSM.APIGetFaceConnectedComponentReadOnly (nHistoryID, nFaceID, bUseVertices, bSmooth)
 APIGetFaceConnectedComponentReadOnly Parameters: In: nHistoryID, nFaceID, bUseVertices, bSmooth Out: aConnectedFaces. More...
 
json WSM.APIGetFaceVariantReadOnly (nHistoryID, nFaceID)
 APIGetFaceVariantReadOnly returns the variant of nFaceID. More...
 
json WSM.APIGetFaceVertexNormalsReadOnly (nHistoryID, nFaceID)
 APIGetFaceVertexNormalsReadOnly returns the plane of nFaceID. More...
 
json WSM.APIGetVertexPoint3dReadOnly (nHistoryID, nVertexID)
 APIGetVertexPoint3d returns the Point3d of a Vertex Parameters: In: nHistoryID, nVertexID Out: pt. More...
 
json WSM.APIGetIdOfActiveDeltaReadOnly (nHistoryID, nDeltaOffset)
 Get the active Delta ID. More...
 
json WSM.APIGetBodyEdgesReadOnly (nHistoryID, nBodyID)
 APIGetBodyEdgesReadOnly returns an array of all edge IDs for the given nBodyID. More...
 
json WSM.APIGetAllNonOwnedReadOnly (nHistoryID)
 APIGetAllNonOwnedReadOnly returns an array of all NonOwned Object IDs. More...
 
json WSM.APIGetAllConnectedNonOwnedReadOnly (nHistoryID, nObjectID)
 APIGetAllConnectedNonOwnedReadOnly returns an array of all NonOwned Object IDs that are connected to nObjectID. More...
 
json WSM.APIRayFireReadOnly (nHistoryID, line3dPickRay, dRayRadius, bVertices, bEdges, bFaces)
 APIRayFireReadOnly calls WSM.APIRayFireReadOnly. More...
 
json WSM.APIRayFireSortedReadOnly (nHistoryID, line3dPickRay, dRayRadius, bVertices, bEdges, bFaces, dMaxParam, bSearchInGroups, aIgnoreObjects)
 APIRayFireSortedReadOnly calls WSM.APIRayFireReadOnly. More...
 
json WSM.APIIntersectsNegativeSideOfPlanesReadOnly (nHistoryID, aPlanes, bVertices, bEdges, bFaces, bStrict, dTol, line3dPickRay, bSearchInGroups, bPickInstances, aIgnoreObjects, bOneOnlyTest)
 
json WSM.APITransformObject (nHistoryID, nObjectID, transf3d)
 APITransformObject transforms nObjectID by the given transform (transf3d). More...
 
json WSM.APITransformObjects (nHistoryID, aObjectIDs, transf3d)
 APITransformObjects transforms aObjectIDs by the given transform (transf3d). More...
 
json WSM.APIDeleteObject (nHistoryID, nObjectID)
 APIDeleteObject deletes nObjectID in the given nHistoryID. More...
 
json WSM.APIDeleteObjects (nHistoryID, aObjectIDs)
 APIDeleteObjects deletes a vector of aObjectIDs in the given nHistoryID. More...
 
json WSM.APICreateEmptyBody (nHistoryID)
 APICreateEmptyBody creates an empty body. More...
 
json WSM.APIAddFaceComponentToBody (nHistoryID, nFaceID, nBodyID)
 APIAddFaceComponentToBody adds a Face and all connected Faces to a Body. More...
 
json WSM.APIMoveVertices (nHistoryID, aVertexIDs, aNewVertexPositions)
 APIMoveVertices moves the vertices specified in aVertexIDs to the given positions in aNewVertexPositions. More...
 
json WSM.APIMoveObject (nHistoryID, objectID, displacement)
 APIMoveObject moves the given object with displacement. More...
 
json WSM.APIMoveObjects (nHistoryID, objectIDs, transf3d)
 APIMoveObjects moves the given objects with t. More...
 
json WSM.APIDumpResults ()
 Dump the list of Results managed by ScriptInstance. More...
 
json WSM.APIGetResultsCount ()
 Get the number of Results managed by ScriptInstance. More...
 
json WSM.APIClearResults ()
 Clear the list of Results managed by ScriptInstance. More...
 
json WSM.APIConnectPoint3ds (nHistoryID, point3d1, point3d2)
 APIConnectPoint3ds Parameters: In: nHistoryID, point3d1, point3d2 Out: JSON_UNDEFINED. More...
 
json WSM.APIConnectVertexAndPoint3d (nHistoryID, nVertexID, point3d)
 APIConnectVertexAndPoint3d Parameters: In: nHistoryID, nVertexID, point3d Out: JSON_UNDEFINED. More...
 
json WSM.APIConnectVertices (nHistoryID, nVertexID1, nVertexID2)
 APIConnectVertices Parameters: In: nHistoryID, nVertexID1, nVertexID2 Out: JSON_UNDEFINED. More...
 
json WSM.APIImprint (nHistoryID, nObjectID1, nObjectID2, bChangeBoth)
 APIImprint Parameters: In: nHistoryID, nObjectID1, nObjectID2, bChangeBoth Out: JSON_UNDEFINED. More...
 
json WSM.APIImprintWithPlane (nHistoryID, nObjectID, plane)
 APIImprintWithPlane Parameters: In: nHistoryID, nObjectID, plane Out: JSON_UNDEFINED. More...
 
json WSM.APIIsEdgeOnCircleReadOnly (nHistoryID, nEdgeID)
 APIIsEdgeOnCircleReadOnly Parameters: In: nHistoryID, nEdgeID Out: radius, center, normal, xaxis, aAllCircleSiblings, bHasCircleAttribute. More...
 
json WSM.APIEditCircleEdges (nHistoryID, nEdgeIDs, radius, center, normal, xaxis, angle)
 APIEditCircleEdges Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis. More...
 
json WSM.APIIsEdgeOnSplineReadOnly (nHistoryID, nEdgeID)
 APIIsEdgeOnSplineReadOnly Parameters: In: nHistoryID, nEdgeID Out: aControlPoints, bClosed, startTangent, endTangent, aAllSplineSiblings, bHasSplineAttribute. More...
 
json WSM.APIEditSplineEdges (nHistoryID, nEdgeIDs, aControlPoints, bClosed, startTangent, endTangent)
 APIEditSplineEdges Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis. More...
 
json WSM.APIIsFaceOnCylinderReadOnly (nHistoryID, nFaceID)
 APIIsFaceOnCylinderReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, center, normal, xaxis, aAllCylinderSiblings, bHasCylinderAttribute. More...
 
json WSM.APIEditCylinderFaces (nHistoryID, nFaceIDs, radius, center, normal, xaxis)
 APIEditCylinderFaces Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis. More...
 
json WSM.APIIsFaceOnSphereReadOnly (nHistoryID, nFaceID)
 APIIsFaceOnSphereReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, center, normal, xaxis, aAllSphereSiblings, bHasSphereAttribute. More...
 
json WSM.APIEditSphereFaces (nHistoryID, nFaceIDs, radius, center, normal, xaxis)
 APIEditSphereFaces Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis. More...
 
json WSM.APIIsFaceOnExtrudeReadOnly (nHistoryID, nFaceID)
 APIIsFaceOnExtrudeReadOnly Parameters: In: nHistoryID, nFaceID Out: base, axis, xaxis, aControlPoints, bClosed, startTangent, endTangent, aAllExtrudeSiblings, bHasExtrudeAttribute. More...
 
json WSM.APIIsFaceOnBlendReadOnly (nHistoryID, nFaceID)
 APIIsFaceOnBlendReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, aPathPoints, aAllBlendSiblings, bHasBlendAttribute. More...
 
json WSM.APIUnite (nHistoryID, nObjectID1, nObjectID2, aExtraObjectsIDs)
 APIUnite Parameters: In: nHistoryID, nObjectID1, nObjectID2 Out: JSON_UNDEFINED. More...
 
json WSM.APISubtract (nHistoryID, nObjectID1, nObjectID2, aExtraObjectsIDs)
 APISubtract Parameters: In: nHistoryID, nObjectID1, nObjectID2 Out: JSON_UNDEFINED. More...
 
json WSM.APIUniteNonDestructive (blank, tools)
 APIUniteNonDestructive Parameters: In: blank, tools Out: JSON_UNDEFINED. More...
 
json WSM.APISubtractNonDestructive (blank, tools)
 APISubtractNonDestructive Parameters: In: blank, tools Out: JSON_UNDEFINED. More...
 
json WSM.APISeparate (nHistoryID, nBodyID)
 APISeparate Parameters: In: nHistoryID, nBodyID Out: A vector of new Body IDs. More...
 
json WSM.APISlice (nHistoryID, nDestinationHistoryID, nObjectID, plane, aIgnoreObjects)
 APISlice When aIgnoreObjects is not empty, only objects that are not part of aIgnoreObjects are sliced. More...
 
json WSM.APISliceHistoryReadOnly (nHistoryID, plane, aIgnoreObjects)
 APISliceHistoryReadOnly Slices the history with the Plane creating line points. More...
 
json WSM.APIGetMemorySizeReadOnly (nHistoryID, bCollapsedHistoryWithLiveObjsOnly)
 APIGetMemorySizeReadOnly Parameters: In: nHistoryID Out: nBytes. More...
 
json WSM.APIGetVersionReadOnly ()
 APIGetVersionReadOnly Parameters: In: Out: JSON. More...
 
json WSM.APIGetDatabaseVersionReadOnly ()
 APIGetDatabaseVersionReadOnly Parameters: In: Out: JSON. More...
 
json WSM.APIGetBoxReadOnly (nHistoryID, nObjectID, transf)
 APIGetBoxReadOnly Parameters: In nHistoryID, nObjectID (Optional), transf (Optional) Out: Interval3d. More...
 
json WSM.APIEnableJournaling (nHistoryID, sFilePath)
 APIEnableJournaling If sFilePath is not provided, the journal will be stored in a string. More...
 
json WSM.APIEnableJournalingToString (nHistoryID)
 
json WSM.APIEnableJournalingTypes (aTypes)
 APIEnableJournalingTypes() function. More...
 
json WSM.APIDisableJournaling ()
 APIDisableJournaling() function. More...
 
json WSM.APIFaceContainsPointReadOnly (nHistoryID, nFaceID, point)
 APIFaceContainsPointReadOnly() function. More...
 
json WSM.APIGetInvalidID ()
 APIGetInvalidID Parameters: In: Out: ID. More...
 
json WSM.APIValidID (nID)
 APIValidID. More...
 
json WSM.FacetsBodyData (m_points, m_polygonIndices, m_polygonSmoothingIds, m_colors, m_polygonColorIndices, m_pointColors)
 GroupInstancePath creation method In: m_points, m_polygonIndices, m_polygonSmoothingIds, m_colors, m_polygonColorIndices, m_pointColors Out: FacetsBodyData. More...
 
json WSM.GroupInstancePath (objectIDs)
 GroupInstancePath takes any form of Objects (GroupInstancePath, GroupInstancePathArray, ObjectHistoryIDArray, ObjectIDArray) and coverts to GroupInstancePath. More...
 
json WSM.ObjectHistoryID (nHistoryID, nObjectID)
 
json WSM.ObjectHistoryIDAreEqual (id1, id2)
 ObjectHistoryIDAreEqual equals method In: ObjectID, ObjectID Out: bool. More...
 
json WSM.Color (r, g, b, a)
 Color constructs a Color. More...
 
json WSM.ColorAreEqual (c1, c2)
 ColorAreEqual returns true if the two given colors are equal. More...
 
json WSM.APIGetCoedgeDirectionReadOnly (nHistoryID, nObjectID)
 APIGetCoedgeDirectionReadOnly returns true if coedge and edge go in the same direction. More...
 
json WSM.APIGetConvexityReadOnly (nHistoryID, nEdgeOrLoopID)
 APIGetConvexityReadOnly returns the convexity of Edge or Loop ID. More...
 
json WSM.APIGetConvexityConnectedComponentReadOnly (nHistoryID, nLoopOrFaceID, nConvexity)
 APIGetConvexityConnectedComponentReadOnly Parameters: In: nHistoryID, nLoopOrFaceID, nConvexity Out: aConnectedFaces. More...
 
json WSM.APICopyOrSketchAndTransformObjects (nFromHistoryID, nToHistoryID, aFromObjectIDs, transform, nNumCopies, bGroupBodies, groupTransf3d)
 APICopyOrSketchAndTransformObjects makes numCopies of the given objects. More...
 
json WSM.APISetObjectsMaterial (nHistoryID, aObjectIDs, nMaterialID)
 APISetObjectsMaterial sets a material for the given object. More...
 
json WSM.APISetFaceBacksideMaterial (nHistoryID, aFaceIDs, nMaterialID)
 Sets the material given by MaterialID as the backside material of the given faces. More...
 
json WSM.APIGetFaceBacksideMaterialReadOnly (nHistoryID, nFaceID)
 Gets the material of the backside of the given face. More...
 
json WSM.APIGetObjectAttributesReadOnly (nHistoryID, nObjectID)
 Get all of the Attributes of the given Object. More...
 
json WSM.APIGetObjectMaterialReadOnly (nHistoryID, nFaceID)
 APIGetObjectMaterialReadOnly gets an Object's material. More...
 
json WSM.APICreateMaterial (nHistoryID, nColor, dHorizonalScale, dVerticalScale, nTextureID, sMaterialName, sMaterialIdentifier, aAdditionalRenderData, aAdditionalTextures)
 APICreateMaterial makes a new Material. More...
 
json WSM.APICreateMaterialWithTexture (nHistoryID, nColor, dHorizonalScale, dVerticalScale, aBitmapData, bUseBitmapAlpha, sMaterialName, sMaterialIdentifier, aAdditionalRenderData, aAdditionalTextures, sTextureName)
 APICreateMaterialWithTexture makes a new Material. More...
 
json WSM.APISetMaterialColor (nHistoryID, nMaterialID, nColor)
 APISetMaterialColor sets the color on a Material. More...
 
json WSM.APISetMaterialData (nHistoryID, nMaterialID, nColor, dHorizontalScale, dVerticalScale, nTextureID, sMaterialName, sMaterialIdentifier, aAdditionalRenderData, aAdditionalTextures)
 APISetMaterialData sets all the data of a Material. More...
 
json WSM.APISetMaterialTexture (nHistoryID, nMaterialID, dHorizontalScale, dVerticalScale, nTextureID)
 APISetMaterialTexture sets the texture properties on a Material. More...
 
json WSM.APIGetMaterialDataReadOnly (nHistoryID, nMaterialID)
 APIGetMaterialDataReadOnly gets the Material properties. More...
 
json WSM.APICreateTexture (nHistoryID, aBitmapData, bUseBitmapAlpha, sTextureName)
 APICreateTexture creates a new Texture object Parameters: In: nHistoryID, aBitmapData, sTextureName Out: nCreatedTextureID. More...
 
json WSM.APIGetTextureDataReadOnly (nHistoryID, nTextureID)
 APIGetTextureDataReadOnly gets a Texture object's bitmap data Parameters: In: nHistoryID, nTextureID Out: JSON object with data. More...
 
json WSM.APISetTextureData (nHistoryID, nTextureID, aBitmapData, bUseBitmapAlpha, sTextureName)
 APISetTexture data sets the bitmap data on a texture Parameters: In: nHistoryID, nTextureID, sBitmapData, nBytes Out: JSON_UNDEFINED;. More...
 
json WSM.APIGetObjectTextureCoordinatesReadOnly (nHistoryID, nObjectID)
 APIGetObjectTextureCoordinatesReadOnly generates tex coords for body or single face Parameters: In: nHistoryID, nObjectID Out: aTexCoords. More...
 
json WSM.APICreateLevelObjects (nHistoryID, aLevelsData)
 APICreateLevelObjects makes new Levels. More...
 
json WSM.APISetLevelsData (nHistoryID, aLevelIDs, aLevelsData)
 APISetLevelsData sets the elevation and name properties on Level. More...
 
json WSM.APIGetLevelDataReadOnly (nHistoryID, nLevelID)
 APIGetLevelDataReadOnly gets the elevation and name properties. More...
 
json WSM.APISetObjectsLevels (nHistoryID, aObjectIDs, aLevelsIDs)
 APISetObjectsLevels sets the Levels pointed by aLevelsIDs to objects pointed by aObjectIDs. More...
 
json WSM.APIGetObjectLayersReadOnly (nHistoryID, nObjectID)
 APIGetObjectLayersReadOnly gets all layer ids of the given object. More...
 
json WSM.APIGetObjectLevelsReadOnly (nHistoryID, nObjectID)
 APIGetObjectLevelsReadOnly gets all level's ids of the given object. More...
 
json WSM.APIIsObjectLiveReadOnly (nHistoryID, nObjectID)
 APIIsObjectLiveReadOnly checks if an object is alive in history Parameters: In: nHistoryID, nObjectID Out: bIsLive. More...
 
json WSM.APIIsHistoryLiveReadOnly (nHistoryID)
 APIIsHistoryLiveReadOnly checks if an history is alive Parameters: In: nHistoryID Out: bIsLive. More...
 
json WSM.APIIsNonOwnedReadOnly (nHistoryID, nObjectID)
 APIIsNonOwnedReadOnly returns whether this object has an owner. More...
 
json WSM.APIGetLocalCoordinateSystemReadOnly (nHistoryID)
 Get the LCS (local coordinate system) of the given History. More...
 
json WSM.APISetLocalCoordinateSystem (nHistoryID, transf3d)
 Set the LCS (local coordinate system) of the given History. More...
 
json WSM.APICreateImageObject (nHistoryID, sName, nTextureID, fAlphaValue, bFeaturesVisible, aCornersVector)
 APICreateImageObject creates a image object. More...
 
json WSM.APICreateImageObjectWithTexture (nHistoryID, sName, fAlphaValue, bFeaturesVisible, aCornersVector, aBitmapData, sTextureName)
 APICreateImageObjectWithTexture creates a image object with texture. More...
 
json WSM.APICreateSatelliteImageObject (nHistoryID, sName, nTextureID, fAlphaValue, bFeaturesVisible, aCornersVector, coordinates, coordinatesSpan, aPixelDimensionsVector)
 APICreateSatelliteImageObject creates a image object. More...
 
json WSM.APIMoveImage (nHistoryID, nImageID, nShift)
 APIMoveImage moves the image along z axis. More...
 
json WSM.APISetImageData (nHistoryID, nImageID, sName, nTextureID, fAlphaValue, bFeaturesVisible, aCornersVector)
 APISetImageData sets data to image object Parameters: In: nHistoryID, nImageID, sName, nTextureID, fAlphaValue, aCorners Out: JSON_UNDEFINED;. More...
 
json WSM.APIGetFaceFacetsReadOnly (nHistoryID, nFaceID)
 APIGetFaceFacetsReadOnly gets the list of vertices grouped by triangles Parameters: In: nHistoryID, nFaceID Out: aFacets. More...
 
json WSM.APISetSatelliteData (nHistoryID, nImageID, coordinates, coordinatesSpan, aPixelDimensions)
 APISetSatelliteData sets satellite data to image object Parameters: In: nHistoryID, nImageID, coordinates, coordinatesSpan, aPixelDim Out: JSON_UNDEFINED;. More...
 
json WSM.APIRemoveSatelliteData (nHistoryID, nImageID)
 APIRemoveSatelliteData removes satellite data from image object Parameters: In: nHistoryID, nImageID Out: JSON_UNDEFINED;. More...
 
json WSM.APIGetImageDataReadOnly (nHistoryID, nImageID)
 APIGetImageDataReadOnly gets image data Parameters: In: nHistoryID, nImageID Out: sName, nTextureID, nPosition, fAlphaValue, bFeaturesVisible, aCorners, bHasSatelliteData. More...
 
json WSM.APIGetSatelliteDataReadOnly (nHistoryID, nImageID)
 APIGetSatelliteDataReadOnly gets satellite data from image Parameters: In: nHistoryID, nImageID Out: sName, nTextureID, nPosition, fAlphaValue, bFeaturesVisible, aCorners, bHasSatelliteData. More...
 
json WSM.APICreateGroup (nHistoryID, aObjectIDs, aInstanceTransforms, nReferencedHistoryID, transGeometry)
 APICreateGroup creates a Group from a vector of Objects Parameters: In: nHistoryID, aObjectIDs, aInstanceTransforms, nReferencedHistoryID Out: nCreatedGroupID. More...
 
json WSM.APIGetRevitFamilyInformationReadOnly (nHistoryID)
 APIGetRevitFamilyInformationReadOnly returns Revit Family information of the history. More...
 
json WSM.APISetRevitFamilyInformation (nHistoryID, bIsGeneratedFromRFA, bIsGeneratedFromBuiltinRFA, familyCategory, familyReference, familyType, familyExtraData)
 APISetRevitFamilyInformation sets Revit Family information of the history. More...
 
json WSM.APIGetGroupReferencedHistoryReadOnly (nHistoryID, nGroupOrInstanceID, bDeletedInstanceOK, nDeltaOffset)
 APIGetGroupReferencedHistoryReadOnly returns the ID of the Group's or Instance's referenced History Parameters: In: nHistoryID, nGroupOrInstanceID, bDeletedInstanceOK, nDeltaOffset Out: nReferencedHistoryID. More...
 
json WSM.APIGetAllAggregateTransf3dsReadOnly (nReferencedHistoryID, nTopMostHistoryID)
 APIGetAllAggregateTransf3dsReadOnly returns aggregate global transformations on a History referenced by a Group or Groups. More...
 
json WSM.APIFlattenGroupsOrInstances (nHistoryID, aGroupOrInstanceIDs, bRecursive, bImprint)
 Replace the instances and/or groups referenced in aGroupOrInstanceIDs by a copy of the contents of the referenced history. More...
 
json WSM.APIAddInstancesToGroup (nHistoryID, nGroupID, aTransforms)
 Creates new instances in the specified group and returns their IDs. More...
 
json WSM.APICreateSeparateHistoriesForInstances (nHistoryID, aInstanceIDs, bNewGroupPerInstance)
 Creates new copies of the existing groups and the referenced histories for the specified instances. More...
 
json WSM.APICreateStringAttribute (nHistoryID, sKey, sValue, aObjIDs, nCopyBehavior, bIsSharedOnSplit)
 Create a StringAttribute optionally attaching it to the given Objects. More...
 
json WSM.APIGetStringAttributeKeyValueReadOnly (nHistoryID, nStringAttributeID)
 Gets the key and value strings from a StringAttribute. More...
 
json WSM.APISetStringAttributeValue (nHistoryID, nStringAttributeID, sValue)
 Sets the value strings for a StringAttribute In: nHistoryID, nStringAttributeID, sValue. More...
 
json WSM.APIGetStringAttributesByKeyReadOnly (nHistoryID, nObjectID, sKey)
 Returns all StringAttributes attached to the Object given by nObjectID with key matching sKey. More...
 
json WSM.APIGetRenderableFaceReadOnly (nHistoryID, nFaceID, bCalculateTexCoords, bBackSide)
 Returns vertices in groups of 3 (triangles), with associated normals and optionally texture coordinates. More...
 
json WSM.APISetFaceUVDataAttributes (nHistoryID, aFaceIDs, rTransf3d, bReplaceTransform, tformCenter, tformUVCenter)
 Sets FaceUVDataAttributes on the faces passed in and applies a transform to them. More...
 
json WSM.APIGetFaceUVDataTransformReadOnly (nHistoryID, nFaceID, bBackSide)
 Gets the 2d transform, returned as a 3d transform, for the uvs on the given Face. More...
 
json WSM.APIGetFaceUVDataAttributeUVsReadOnly (nHistoryID, nFaceUVDataAttributeID)
 Gets the UVs from a FaceUVDataAttribute. More...
 
json WSM.APIGetEdgePointsReadOnly (nHistoryID, nEdgeID)
 Get edge endpoints directly. More...
 
json WSM.APIIsHistoryNonTemporaryReadOnly (nHistoryID)
 Returns whether a history is temporary or not. More...
 
json WSM.APICreateLayer (nHistoryID, name, bDisplayed)
 Create a layer object with a given name and display flag. More...
 
json WSM.APIGetLayerDataReadOnly (nHistoryID, nLayerID)
 Get the data from a layer. More...
 
json WSM.APISetLayerData (nHistoryID, nLayerID, name, bDisplayed)
 Set the data of a layer. More...
 
json WSM.APISetLayersDisplayed (nHistoryID, aLayerIDs, bDisplayed)
 Set the display flag of layers without affecting the other data. More...
 
json WSM.APIAddObjectsLayers (nHistoryID, aLayerIDs, aObjectIDs)
 Add layers to objects. More...
 
json WSM.APIRemoveObjectsLayers (nHistoryID, aLayerIDs, aObjectIDs)
 Remove layers from objects. More...
 
json WSM.APIAddRemoveObjectsLayers (nHistoryID, aAddLayerIDs, aRemoveLayerIDs, aObjectIDs)
 Add layers to and remove layers from objects in a single operation. More...
 
json WSM.APICreateGeometryFromData (nHistoryID, aTextures, aMaterials, aLayers, aInstances, aFaceCollections, aEdges, aCurves, aImages, aGroupName, bCreateMesh)
 Load a model from vectors of various data in a single delta. More...
 
json WSM.APICreateEdgesFromData (nHistoryID, aLayers, aEdges, aCurves, bCreateMesh, accuracyORcount)
 Load a set of edges from vectors of various data in a single delta. More...
 
json WSM.APIIsEdgeMergeableReadOnly (nHistoryID, nEdgeID, bUseMaterial)
 APIIsEdgeMergeableReadOnly In: nHistoryID, nEdgeID, bUseMaterial Out:bool (true or false that the Edge is mergeable. More...
 
json WSM.APIGetEdgeStyleReadOnly (nHistoryID, nEdgeID)
 Get the style of an edge. More...
 
json WSM.APISetEdgesStyle (nHistoryID, aEdgeIDs, nColor)
 Set the style of edges on given objects. More...
 
json WSM.APIIsExactMatchReadOnly (nHistoryID1, nHistoryID2, nObjectID1, nObjectID2)
 API compares either two Histories or two Objects and sets bIsExact to true when they match exactly. More...
 
json WSM.APIDebugObjectReadOnly (nHistoryID, nObjectID)
 APIDebugObjectReadOnly() function. More...
 
json WSM.APIGetDynamoModelInformationReadOnly (nHistoryID)
 APIGetDynamoModelInformationReadOnly returns Dynamo Model information of the history. More...
 
json WSM.APISetDynamoModelInformation (nHistoryID, id, name, config, delta)
 APISetDynamoModelInformation sets Dynamo Model information of the history. More...
 
json WSM.Is32Bit ()
 Is32Bit returns true if WSM is compiled in 32 bit. More...
 
json WSM.APIGetConnectedEdgesReadOnly (nHistoryID, nEdgeID, bBreakOnNonSmooth)
 Returns all connected edges of a seed edge. More...
 
json WSM.APIGetEnabledJournalingTypesReadOnly ()
 APIGetEnabledJournalingTypesReadOnly returns the list of journaling 'types' that are enabled. More...
 
json WSM.APIGetHistoryReferencingGroupsReadOnly (nHistoryID)
 Returns a vector with groups that reference this history. More...
 
json WSM.APIGetInstanceTransf3dReadOnly (nHistoryID, nInstanceID)
 Returns the Instance's Transf3d. More...
 
json WSM.APIGetPointsFromObjectIDsReadOnly (nHistoryID, aIDs)
 Helper function used in sweeping to get points from the profile or path Objects. More...
 
json WSM.APIIsJournalingReadOnly ()
 Check if Journaling is enabled. More...
 
json WSM.APICleanModel (nHistoryID, dEdgeTol)
 Changes the model fixing errors and getting rid of undesired features. More...
 
json WSM.APISplitAtNonManifoldEdgesAndVertices (nHistoryID)
 Changes the model so that every edge on more than two faces and every vertex with more than one edge group is copied so that these conditions no longer occur. More...
 
json WSM.APICreateMesh (nHistoryID, aPoints, aTriangles, aNormals, aUVs, aColors)
 Create a Mesh. More...
 
json WSM.APIGetMeshDataReadOnly (nHistoryID, nMeshID)
 Get the data from a Mesh. More...
 
json WSM.APIComputeSharedMeshDataReadOnly (nHistoryID, nMeshID, dCosSmoothAngle)
 Compute the shared data from a Mesh where mesh vertices with the same point and normal are not repeated. More...
 
json WSM.APIMeshContainsPointReadOnly (nHistoryID, nMeshID, point)
 Returns true and the normal if the Mesh contains the point. More...
 
json WSM.APIMeshPointOnOrInsideIfManifoldReadOnly (nHistoryID, nMeshID, point)
 Return true if the given point is on the Mesh. More...
 
json WSM.APIMeshComputeSilhouetteEdgesReadOnly (nHistoryID, nMeshID, cameraPos, cameraDir, bPerspectiveView)
 Returns silhouette edges from the Mesh. More...
 
json WSM.APIMeshComputeNonSmoothEdgesReadOnly (nHistoryID, nMeshID, dCosSmoothAngle)
 Returns non-smooth edges from the Mesh. More...
 
json WSM.APIConvertMeshesToObjects (nHistoryID, aMeshIDs, dCosSmoothAngle, bFlatten)
 Converts Meshes into Bodies with triangular Faces. More...
 
json WSM.APILinkMeshesForConversion (nHistoryID, aMeshIDs)
 Link the Meshes with a shared string Attribute. More...
 
json WSM.APIConvertObjectsToMeshes (nHistoryID, aObjectIDs)
 Converts non-Mesh Objects into Meshes with one Mesh per Material used. More...
 
json WSM.APICreateVertex (nHistoryID, position)
 Create a Vertex with the given position. More...
 
json WSM.APIFlattenFaces (nHistoryID, aFaceIDs, dTol)
 Flattens all Faces given by aFaceIDs onto the plane of the first Face when all Faces lie within dTol of the first Face's plane, then merges into a single Face. More...
 
json WSM.APICreateLineMesh (nHistoryID, aPoints, aIndices, aCounts)
 Create a LineMesh. More...
 
json WSM.APIGetLineMeshDataReadOnly (nHistoryID, nLineMeshID)
 Get the data from a LineMesh. More...
 
json WSM.APILineMeshContainsPointReadOnly (nHistoryID, nLineMeshID, point)
 Returns true if the LineMesh contains the point. More...
 
json WSM.APILineMeshGetPointsOnNegativeSideOfPlanesReadOnly (nHistoryID, nLineMeshID, aPlanes, line3dPickRay, dTol)
 Get all points nearest the given line from segments of the LineMesh that lie on the negative side of all the given Planes. More...
 
json WSM.APICreatePointMesh (nHistoryID, aPoints)
 Create a PointMesh. More...
 
json WSM.APIGetPointMeshDataReadOnly (nHistoryID, nPointMeshID)
 Get the data from a PointMesh. More...
 
json WSM.APIPointMeshContainsPointReadOnly (nHistoryID, nPointMeshID, point)
 Returns true if the PointMesh contains the point. More...
 
json WSM.APIIsMeshManifoldReadOnly (nHistoryID, nMeshID)
 Returns true if the Mesh is manifold, i.e. More...
 
json WSM.APIPointMeshGetPointsOnNegativeSideOfPlanesReadOnly (nHistoryID, nPointMeshID, aPlanes, dTol)
 Get all points of the PointMesh that lie on the negative side of all the given Planes. More...
 
json WSM.APIPushMirrorTransformationsOntoGeometry (nHistoryID)
 Pushes mirror Instance transformations onto the underlying geometry sharing referenced Histories as much as possible. More...
 
json WSM.APICheckMassesCollideReadOnly (nHistoryID)
 Returns true if bodies that enclose volume (possibly in instances) touch or overlap. More...
 

Function Documentation

json WSM.APIAddFaceComponentToBody ( nHistoryID  ,
nFaceID  ,
nBodyID   
)

APIAddFaceComponentToBody adds a Face and all connected Faces to a Body.

Parameters: In: nHistoryID, nFaceID, nBodyID Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]nBodyIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIAddInstancesToGroup ( nHistoryID  ,
nGroupID  ,
aTransforms   
)

Creates new instances in the specified group and returns their IDs.

Parameters
[in]nHistoryIDint
[in]nGroupIDint
[in]aTransformsArray of WSM.Transf3d
Returns
aNewInstanceIDs
json WSM.APIAddObjectsLayers ( nHistoryID  ,
aLayerIDs  ,
aObjectIDs   
)

Add layers to objects.

Parameters
[in]nHistoryIDint
[in]aLayerIDsWSM.Utils.HistoryObjects
[in]aObjectIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIAddRemoveObjectsLayers ( nHistoryID  ,
aAddLayerIDs  ,
aRemoveLayerIDs  ,
aObjectIDs   
)

Add layers to and remove layers from objects in a single operation.

The Add operations happen first, so if the same layer is in both vectors, the layer will be removed from the object.

Parameters
[in]nHistoryIDint
[in]aAddLayerIDsWSM.Utils.HistoryObjects
[in]aRemoveLayerIDsWSM.Utils.HistoryObjects
[in]aObjectIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIAddSolidDefGuids ( nHistoryID  ,
aObjectIDs   
)

APIAddSolidDefGuids: Adds solid-def guids in StringAttributes to the given Objects.

Parameters: In: nHistoryID, aObjectIDs Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]aObjectIDsArray of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIBlend ( nHistoryID  ,
dRadius  ,
aPathIDs  ,
accuracyORcount  ,
nMinimumNumberOfFacets   
)

APIBlend creates a blend surface using the specified path.

Parameters: In: nHistoryID, dRadius, aPathIDs Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]dRadiusdouble
[in]aPathIDsWSM.Utils.HistoryObjects
[in]accuracyORcount(OPTIONAL, default = 6.0) double
[in]nMinimumNumberOfFacets(OPTIONAL, default = 0) int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APICanRedoHistoryReadOnly ( nHistoryID  )

APICanRedoHistoryReadOnly true if redo is possible.

Parameters: In: nHistoryID Out: bool

Parameters
[in]nHistoryIDint
Returns
bCanRedo
json WSM.APICanRedoHistoryToDeltaReadOnly ( nHistoryID  ,
nDeltaID   
)

APICanRedoHistoryToDeltaReadOnly true if redo is possible.

Parameters: In: nHistoryID, nDeltaID Out: bool

Parameters
[in]nHistoryIDint
[in]nDeltaIDint
Returns
bCanRedo
json WSM.APICanUndoHistoryReadOnly ( nHistoryID  )

APICanUndoHistoryReadOnly true if undo is possible.

Parameters: In: nHistoryID Out: bool

Parameters
[in]nHistoryIDint
Returns
bCanUndo
json WSM.APICanUndoHistoryToDeltaReadOnly ( nHistoryID  ,
nDeltaID   
)

APICanUndoHistoryToDeltaReadOnly true if undo is possible.

Parameters: In: nHistoryID, nDeltaID Out: bool

Parameters
[in]nHistoryIDint
[in]nDeltaIDint
Returns
bCanUndo
json WSM.APIChangeHistoryID ( nHistoryID  )

APIChangeHistoryID() function.

Parameters
[in]nHistoryIDint
Returns
nHistoryID
json WSM.APICheckHistoryValidityReadOnly ( nHistoryID  )

Finds all errors in the History (including on every live Object in the History).

Note this is a read only operation. Returns the number of bad Results.

Parameters
[in]nHistoryIDint
Returns
validityResults
json WSM.APICheckMassesCollideReadOnly ( nHistoryID  )

Returns true if bodies that enclose volume (possibly in instances) touch or overlap.

In: nHistoryID Out: Boolean.

Parameters
[in]nHistoryIDint
Returns
bCollisionDetected
json WSM.APICheckValidityReadOnly ( nHistoryID  ,
nObjectID   
)

Finds all errors on the Object.

Note this is a read-only operation. Parameters: In: nHistoryID, nObjectID Out: The number of Results

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
validityResults
json WSM.APICleanModel ( nHistoryID  ,
dEdgeTol   
)

Changes the model fixing errors and getting rid of undesired features.

Parameters: In: nHistoryID, dEdgeTol Out: Vector of changed History IDs

Parameters
[in]nHistoryIDint
[in]dEdgeTol(OPTIONAL, default = 0.0) double
Returns
aChangedHistories
json WSM.APIClearResults ( )

Clear the list of Results managed by ScriptInstance.

Returns
numResults
json WSM.APIComputeAreaReadOnly ( nHistoryID  ,
nObjectID  ,
transf   
)

Computes the surface area of the Object.

Note, if pTransf3d is non-NULL it is used to transform the Object before computing the area. This should only have an effect on the computation if the transform is non-rigid. Parameters: In: nHistoryID, nObjectID, transf Out: nArea

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]transf(OPTIONAL) WSM.Transf3d
Returns
nArea
json WSM.APIComputeSharedMeshDataReadOnly ( nHistoryID  ,
nMeshID  ,
dCosSmoothAngle   
)

Compute the shared data from a Mesh where mesh vertices with the same point and normal are not repeated.

Parameters: In: nHistoryID, nMeshID, dCosSmoothAngle Out: The shared mesh data.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
[in]dCosSmoothAngle(OPTIONAL, default = 0.86602540378443864676372317075294) double
Returns
{ { "points" , to_json(aPoints) }, { "triangles" , to_json(aTriangles) }, { "normals" , to_json(aNormals) }, { "uv_triangles" , to_json(aUVTriangles) }, { "uvs" , to_json(aUVs) }, { "edges" , to_json(aEdges) } };
json WSM.APIComputeVolumeReadOnly ( nHistoryID  ,
nObjectID  ,
transf   
)

Computes the volume of the Object.

Note, if pTransf3d is non-NULL it is used to transform the Object before computing the volume. This should only have an effect on the computation if the transform is non-rigid. Parameters: In: nHistoryID, nObjectID, transf Out: nVolume

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]transf(OPTIONAL) WSM.Transf3d
Returns
nVolume
json WSM.APIConnectPoint3ds ( nHistoryID  ,
point3d1  ,
point3d2   
)

APIConnectPoint3ds Parameters: In: nHistoryID, point3d1, point3d2 Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]point3d1WSM.Point3d
[in]point3d2WSM.Point3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIConnectVertexAndPoint3d ( nHistoryID  ,
nVertexID  ,
point3d   
)

APIConnectVertexAndPoint3d Parameters: In: nHistoryID, nVertexID, point3d Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nVertexIDint
[in]point3dWSM.Point3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIConnectVertices ( nHistoryID  ,
nVertexID1  ,
nVertexID2   
)

APIConnectVertices Parameters: In: nHistoryID, nVertexID1, nVertexID2 Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nVertexID1int
[in]nVertexID2int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIConvertMeshesToObjects ( nHistoryID  ,
aMeshIDs  ,
dCosSmoothAngle  ,
bFlatten   
)

Converts Meshes into Bodies with triangular Faces.

If bMerge is true coplanar Faces will be merged. Converts LineMeshes and PointMeshes into Groups containing non-owned Edges and Vertices respectively. Note the original Meshes, LineMeshes, and PointMeshes are deleted. In: nHistoryID, aMeshIDs, dCosSmoothAngle Out: Created Object IDs.

Parameters
[in]nHistoryIDint
[in]aMeshIDsWSM.Utils.HistoryObjects
[in]dCosSmoothAngle(OPTIONAL, default = -1.0) double
[in]bFlatten(OPTIONAL, default = true) bool
Returns
aCreatedObjectIDs
json WSM.APIConvertObjectsToMeshes ( nHistoryID  ,
aObjectIDs   
)

Converts non-Mesh Objects into Meshes with one Mesh per Material used.

The original Objects are deleted. Returns a vector of created Meshes. In: nHistoryID, aObjectIDs Out: Created Mesh IDs.

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
Returns
aCreatedMeshIDs
json WSM.APICopyObject ( nHistoryID  ,
nToHistoryID  ,
nObjectID   
)

APICopyObject copies nObjectID in nHistoryID to nToHistoryID.

nHistoryID and nToHistoryID can be the same. Parameters: In: nHistoryID, nObjectID, nToHistoryID Out: nObjectID (The new copied Object)

Parameters
[in]nHistoryIDint
[in]nToHistoryIDint
[in]nObjectIDint
Returns
nCreatedObjectID
json WSM.APICopyOrSketchAndTransformObjects ( nFromHistoryID  ,
nToHistoryID  ,
aFromObjectIDs  ,
transform  ,
nNumCopies  ,
bGroupBodies  ,
groupTransf3d   
)

APICopyOrSketchAndTransformObjects makes numCopies of the given objects.

Bodies are copied, anything else is sketched. Parameters: In: nFromHistoryID, nToHistoryID, aFromObjectIDs, transform, nNumCopies, bGroupBodies, groupTransf3d Out: Array of copied body IDs

Parameters
[in]nFromHistoryIDint
[in]nToHistoryIDint
[in]aFromObjectIDsWSM.Utils.HistoryObjects
[in]transformWSM.Transf3d
[in]nNumCopiesint
[in]bGroupBodies(OPTIONAL, default = false) bool
[in]groupTransf3d(OPTIONAL) WSM.Transf3d
Returns
aCopiedBodyIDs
json WSM.APICover ( nHistoryID  ,
aEdgeIDs  ,
bMerge   
)

APICover makes Faces the cover a closed circuit of Edges.

Parameters: In: nHistoryID, aEdgeIDs, bMerge Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]aEdgeIDsWSM.Utils.HistoryObjects
[in]bMerge(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APICreateBlock ( nHistoryID  ,
point3d1  ,
point3d2   
)

Create a block with the given corners.

Parameters: In: nHistoryID, point3d1(Point3d) , point3d2(Point3d) Out: nObjectID

Parameters
[in]nHistoryIDint
[in]point3d1WSM.Point3d
[in]point3d2WSM.Point3d
Returns
objID
json WSM.APICreateCircleOrArc ( nHistoryID  ,
radius  ,
posCenter  ,
xAxis  ,
yAxis  ,
dStartParam  ,
dEndParam  ,
accuracyORcount  ,
bReadOnly  ,
trans  ,
nMinimumNumberOfFacets   
)

Create a circle or arc defined by C(t) = posCenter + radius * (xAxis * cos(t) + yAxis * sin(t)) where t goes from dStartParam to dEndParam Parameter accuracyORcount means: MAX distance between base circle and segment as portion of R, if < .75 number of divisions (double rounded to int) over 90 degree arc, if >= .75 Parameters: In: nHistoryID , radius, posCenter, xAxis, yAxis, dStartParam, dEndParam, accuracyORcount, trans, nMinimumNumberOfFacets Out: nObjectID.

Parameters
[in]nHistoryIDint
[in]radiusdouble
[in]posCenterWSM.Point3d
[in]xAxis(OPTIONAL, default = WSM.UnitVector3d.kXDir) WSM.UnitVector3d
[in]yAxis(OPTIONAL, default = WSM.UnitVector3d.kYDir) WSM.UnitVector3d
[in]dStartParam(OPTIONAL, default = 0.0) double
[in]dEndParam(OPTIONAL, default = WSM_2PI) double
[in]accuracyORcount(OPTIONAL, default = 10.0) double
[in]bReadOnly(OPTIONAL, default = false) bool
[in]trans(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
[in]nMinimumNumberOfFacets(OPTIONAL, default = 0) int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APICreateCircleOrArcFromPoints ( nHistoryID  ,
arcStartPos  ,
arcEndPos  ,
thirdPoint  ,
accuracyORcount  ,
bReadOnly  ,
trans  ,
nMinimumNumberOfFacets  ,
bCircle   
)

Create a circle or arc defined by points Parameter accuracyORcount means: MAX distance between base circle and segment as portion of R, if < .75 number of divisions (double rounded to int) over 90 degree arc, if >= .75 Parameters: In: nHistoryID, arcStartPos, arcEndPos, thirdPoint, accuracyORcount, bReadOnly, trans, nMinimumNumberOfFacets, bCircle Out: The created vector of points.

Parameters
[in]nHistoryIDint
[in]arcStartPosWSM.Point3d
[in]arcEndPosWSM.Point3d
[in]thirdPointWSM.Point3d
[in]accuracyORcount(OPTIONAL, default = 10.0) double
[in]bReadOnly(OPTIONAL, default = false) bool
[in]trans(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
[in]nMinimumNumberOfFacets(OPTIONAL, default = 0) int
[in]bCircle(OPTIONAL, default = false) bool
Returns
aPoints
json WSM.APICreateClampedHermiteSplineDataReadOnly ( nHistoryID  ,
aControlPoints  ,
startTangent  ,
endTangent  ,
bClosed  ,
aVertexIDsOnSpline  ,
nNumberOfNewContolPoints   
)
json WSM.APICreateCone ( nHistoryID  ,
nRadius  ,
nHeight  ,
centerPt  ,
nAccuracyORcount   
)

Create a cone (above Z=0) with given parameters.

Parameters: In: nHistoryID, nRadius(#), nHeight(#), centerPt(Point3d), nAccuracyORcount(#) Out: nObjectID

Parameters
[in]nHistoryIDint
[in]nRadiusdouble
[in]nHeightdouble
[in]centerPtWSM.Point3d
[in]nAccuracyORcountdouble
Returns
objID
json WSM.APICreateCylinder ( nHistoryID  ,
aPosCenter  ,
aRadius  ,
aHeight  ,
aAccuracyORcount  ,
aAxis   
)

Create a cylinder on the given History.

Parameters: In: nHistoryID, aPosCenter, aRadius, aHeight, aAxis Out: objID

Parameters
[in]nHistoryIDint
[in]aPosCenterWSM.Point3d
[in]aRadiusdouble
[in]aHeightdouble
[in]aAccuracyORcount(OPTIONAL, default = 10) double
[in]aAxis(OPTIONAL, default = WSM.UnitVector3d.kZDir) WSM.UnitVector3d
Returns
objID
json WSM.APICreateEdgesFromData ( nHistoryID  ,
aLayers  ,
aEdges  ,
aCurves  ,
bCreateMesh  ,
accuracyORcount   
)

Load a set of edges from vectors of various data in a single delta.

All edges are added in a new group which it's hisotry id is returned by this function The structures are defined in the header GeometryDataContainers.h In: nHistoryID, aLayers, aEdges, aCurves, bCreateMesh, accuracyORcount Out: The created group ID.

Parameters
[in]nHistoryIDint
[in]aLayers(OPTIONAL) Array of WSM.LayerData
[in]aEdges(OPTIONAL) Array of WSM.EdgeData
[in]aCurves(OPTIONAL) Array of WSM.CurveData
[in]bCreateMesh(OPTIONAL, default = true) bool
[in]accuracyORcount(OPTIONAL, default = 10.0) double
Returns
nCreatedGroupID
json WSM.APICreateEmptyBody ( nHistoryID  )

APICreateEmptyBody creates an empty body.

Parameters: In: nHistoryID Out: The Body ID

Parameters
[in]nHistoryIDint
Returns
objID
json WSM.APICreateExtrusion ( nHistoryID  ,
aPoint3ds  ,
dist   
)

Create an extrusion on the given History.

aPoints must have more than 3 points and be on the same plane. Extrusion direction is along the normal direction determined by the anticlockwise polygon.

Parameters
[in]nHistoryIDID of the given History
[in]aPoint3dsThe input list of points
[in]distThe given distance for dragging the extrusion Out: objID.
[in]nHistoryIDint
[in]aPoint3dsArray of WSM.Point3d
[in]distdouble
Returns
objID
json WSM.APICreateGeometryFromData ( nHistoryID  ,
aTextures  ,
aMaterials  ,
aLayers  ,
aInstances  ,
aFaceCollections  ,
aEdges  ,
aCurves  ,
aImages  ,
aGroupName  ,
bCreateMesh   
)

Load a model from vectors of various data in a single delta.

The structures are defined in the header GeometryDataContainers.h aGroupName is an optional parameter to give a Name to an history it's mainly used when history is used in conjunction with Groups. If bCreateMesh is true, creates meshes rather than bodies.

Parameters
[in]nHistoryIDint
[in]aTextures(OPTIONAL) Array of WSM.TextureData
[in]aMaterials(OPTIONAL) Array of WSM.MaterialData
[in]aLayers(OPTIONAL) Array of WSM.LayerData
[in]aInstances(OPTIONAL) Array of WSM.InstanceData
[in]aFaceCollections(OPTIONAL) Array of std.vector
[in]aEdges(OPTIONAL) Array of WSM.EdgeData
[in]aCurves(OPTIONAL) Array of WSM.CurveData
[in]aImages(OPTIONAL) Array of WSM.ImageData
[in]aGroupName(OPTIONAL) String
[in]bCreateMesh(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APICreateGroup ( nHistoryID  ,
aObjectIDs  ,
aInstanceTransforms  ,
nReferencedHistoryID  ,
transGeometry   
)

APICreateGroup creates a Group from a vector of Objects Parameters: In: nHistoryID, aObjectIDs, aInstanceTransforms, nReferencedHistoryID Out: nCreatedGroupID.

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]aInstanceTransforms(OPTIONAL) Array of WSM.Transf3d
[in]nReferencedHistoryID(OPTIONAL, default = WSM.INVALID_ID) int
[in]transGeometry(OPTIONAL) WSM.Transf3d
Returns
nCreatedGroupID
json WSM.APICreateHemisphere ( nHistoryID  ,
nRadius  ,
centerPt  ,
nAccuracyORcount   
)

Create a hemisphere with the radius and at the given center point.

Parameters: In: nHistoryID, nRadius(#), centerPt(Point3d), nAccuracyORcount(#) Out: nObjectID

Parameters
[in]nHistoryIDint
[in]nRadiusdouble
[in]centerPtWSM.Point3d
[in]nAccuracyORcountdouble
Returns
objID
json WSM.APICreateHermiteSpline ( nHistoryID  ,
aControlPoints  ,
bClosed  ,
startTangent  ,
endTangent  ,
bReadOnly   
)

Tessellate a cubic spline that touches all aControlPoints Fills the tessellated points into aOutPoints bClosed specifies that the end point is the start point, so the curve must be smooth and closed startTangent is an optional Vector that specifies the tangent at the start point endTangent is an option Vector that specifies the tangent at the end point bReadOnly, if true does not put geometry into the scene, only returns the tessellated points.

Parameters: In: nHistoryID, aControlPoints, bClosed, startTangent, endTangent, bReadOnly Out: aOutPoints, aOutPointsParams

Parameters
[in]nHistoryIDint
[in]aControlPointsArray of WSM.Point3d
[in]bClosed(OPTIONAL, default = false) bool
[in]startTangent(OPTIONAL, default = WSM.Vector3d.kNull) WSM.Vector3d
[in]endTangent(OPTIONAL, default = WSM.Vector3d.kNull) WSM.Vector3d
[in]bReadOnly(OPTIONAL, default = false) bool
Returns
{ { "outpoints" , to_json(aOutPoints) }, { "outpointsparams" , to_json(aOutPointsParams) } };
json WSM.APICreateHistory ( nHistoryID  ,
bNonTemporary   
)

APICreateHistory() function.

Parameters
[in]nHistoryID(OPTIONAL, default = WSM.INVALID_ID) int
[in]bNonTemporary(OPTIONAL, default = true) bool
Returns
nHistoryID
json WSM.APICreateImageObject ( nHistoryID  ,
sName  ,
nTextureID  ,
fAlphaValue  ,
bFeaturesVisible  ,
aCornersVector   
)

APICreateImageObject creates a image object.

Parameters: In: nHistoryID, sName, nTextureID, fAlphaValue, bFeaturesVisible, aCorners Out: nObjectID.

Parameters
[in]nHistoryIDint
[in]sNameString
[in]nTextureIDint
[in]fAlphaValuedouble
[in]bFeaturesVisiblebool
[in]aCornersVectorArray of WSM.Point3d
Returns
nObjectID
json WSM.APICreateImageObjectWithTexture ( nHistoryID  ,
sName  ,
fAlphaValue  ,
bFeaturesVisible  ,
aCornersVector  ,
aBitmapData  ,
sTextureName   
)

APICreateImageObjectWithTexture creates a image object with texture.

Parameters: In: nHistoryID, sName, fAlphaValue, bFeaturesVisible, aCorners, aBitmapData, sTextureName Out: nObjectID.

Parameters
[in]nHistoryIDint
[in]sNameString
[in]fAlphaValuedouble
[in]bFeaturesVisiblebool
[in]aCornersVectorArray of WSM.Point3d
[in]aBitmapDataArray of char
[in]sTextureName(OPTIONAL) String
Returns
nObjectID
json WSM.APICreateLayer ( nHistoryID  ,
name  ,
bDisplayed   
)

Create a layer object with a given name and display flag.

Parameters
[in]nHistoryIDint
[in]nameString
[in]bDisplayedbool
Returns
nLayerID
json WSM.APICreateLevelObjects ( nHistoryID  ,
aLevelsData   
)

APICreateLevelObjects makes new Levels.

Parameters: In: nHistoryID, aLevelsData Out: aObjectIDs

Parameters
[in]nHistoryIDint
[in]aLevelsDataLevelDataType
Returns
aObjectIDs
json WSM.APICreateLineMesh ( nHistoryID  ,
aPoints  ,
aIndices  ,
aCounts   
)

Create a LineMesh.

Parameters: In: nHistoryID, aPoints, aIndices, aCounts Out: ID of created LineMesh.

Parameters
[in]nHistoryIDint
[in]aPointsArray of float
[in]aIndicesArray of uint32_t
[in]aCountsArray of uint32_t
Returns
nLineMeshID
json WSM.APICreateMaterial ( nHistoryID  ,
nColor  ,
dHorizonalScale  ,
dVerticalScale  ,
nTextureID  ,
sMaterialName  ,
sMaterialIdentifier  ,
aAdditionalRenderData  ,
aAdditionalTextures   
)

APICreateMaterial makes a new Material.

Parameters: In: nHistoryID, nColor, dHorizontalScale, dVerticalScale, nTextureID Out: nMaterialID

Parameters
[in]nHistoryIDint
[in]nColorWSM.Color
[in]dHorizonalScale(OPTIONAL, default = 1.0) double
[in]dVerticalScale(OPTIONAL, default = 1.0) double
[in]nTextureID(OPTIONAL, default = WSM.INVALID_ID) int
[in]sMaterialName(OPTIONAL) String
[in]sMaterialIdentifier(OPTIONAL) String
[in]aAdditionalRenderData(OPTIONAL) vectorpairstring
[in]aAdditionalTextures(OPTIONAL) vectorpairstringsize
Returns
nMaterialID
json WSM.APICreateMaterialWithTexture ( nHistoryID  ,
nColor  ,
dHorizonalScale  ,
dVerticalScale  ,
aBitmapData  ,
bUseBitmapAlpha  ,
sMaterialName  ,
sMaterialIdentifier  ,
aAdditionalRenderData  ,
aAdditionalTextures  ,
sTextureName   
)

APICreateMaterialWithTexture makes a new Material.

Parameters: In: nHistoryID, nColor, dHorizontalScale, dVerticalScale, aBitmapData, nBytes Out: nMaterialID

Parameters
[in]nHistoryIDint
[in]nColorWSM.Color
[in]dHorizonalScaledouble
[in]dVerticalScaledouble
[in]aBitmapDataArray of char
[in]bUseBitmapAlpha(OPTIONAL, default = true) bool
[in]sMaterialName(OPTIONAL) String
[in]sMaterialIdentifier(OPTIONAL) String
[in]aAdditionalRenderData(OPTIONAL) vectorpairstring
[in]aAdditionalTextures(OPTIONAL) vectorpairstringsize
[in]sTextureName(OPTIONAL) String
Returns
nMaterialID
json WSM.APICreateMesh ( nHistoryID  ,
aPoints  ,
aTriangles  ,
aNormals  ,
aUVs  ,
aColors   
)

Create a Mesh.

Parameters: In: nHistoryID, aPoints, aTriangles, aNormals, aUVs, aColors Out: ID of created Mesh.

Parameters
[in]nHistoryIDint
[in]aPointsArray of float
[in]aTrianglesArray of uint32_t
[in]aNormals(OPTIONAL) Array of float
[in]aUVs(OPTIONAL) Array of float
[in]aColors(OPTIONAL) Array of WSM.Color
Returns
nMeshID
json WSM.APICreatePointMesh ( nHistoryID  ,
aPoints   
)

Create a PointMesh.

Parameters: In: nHistoryID, aPoints Out: ID of created PointMesh.

Parameters
[in]nHistoryIDint
[in]aPointsArray of float
Returns
nPointMeshID
json WSM.APICreatePolyline ( nHistoryID  ,
aPoint3ds  ,
bForceClosed   
)

Creates a polyline using 3D sketching not linking with existing topology.

Joins the first and last points if bForceClosed is true. Returns the Face when one is created. Note please use APIConnectPoint3ds, APIConnectVertexAndPoint3d, and APIConnectVertices to link with existing topology - which is what is most often desired. Parameters: In: nHistoryID, aPoint3ds, bForceClosed Out: Face ID.

Parameters
[in]nHistoryIDint
[in]aPoint3dsArray of WSM.Point3d
[in]bForceClosedbool
Returns
objID
json WSM.APICreateRectangle ( nHistoryID  ,
firstEdgePt1  ,
firstEdgePt2  ,
projectionPt  ,
bReadOnly   
)

Create a rectangle based on one edge and a third point.

Parameters firstEdgePt1 and firstEdgePt2 define the first edge of the rectangle Parameter projectionPt is projected onto the plane with origin at firstEdgePt2 and normal towards firstEdgePt1 this projection is the third corner of the rectangle. The fourth corner is calculated from those three Parameter aCreatedPts will return a vector of size 4, containing the four corners of the rectangle If parameter bReadOnly is true, no Objects are created, and only the points are returned

Parameters
[in]nHistoryIDint
[in]firstEdgePt1WSM.Point3d
[in]firstEdgePt2WSM.Point3d
[in]projectionPtWSM.Point3d
[in]bReadOnly(OPTIONAL, default = false) bool
Returns
aCreatedPts
json WSM.APICreateSatelliteImageObject ( nHistoryID  ,
sName  ,
nTextureID  ,
fAlphaValue  ,
bFeaturesVisible  ,
aCornersVector  ,
coordinates  ,
coordinatesSpan  ,
aPixelDimensionsVector   
)

APICreateSatelliteImageObject creates a image object.

Parameters: In: nHistoryID, sName, nTextureID, fAlphaValue, bFeaturesVisible, aCorners, coordinates, coordinatesSpan, aPixelDimensionsVector Out: nObjectID.

Parameters
[in]nHistoryIDint
[in]sNameString
[in]nTextureIDint
[in]fAlphaValuedouble
[in]bFeaturesVisiblebool
[in]aCornersVectorArray of WSM.Point3d
[in]coordinatesWSM.Vector2d
[in]coordinatesSpanWSM.Vector2d
[in]aPixelDimensionsVectorArray of int
Returns
nObjectID
json WSM.APICreateSeparateHistoriesForInstances ( nHistoryID  ,
aInstanceIDs  ,
bNewGroupPerInstance   
)

Creates new copies of the existing groups and the referenced histories for the specified instances.

If bNewGroupPerInstance is true, then each given instance gets a new group and history. If it is false, then any input instances that share a group and history currently will share a new group and history.

Parameters
[in]nHistoryIDint
[in]aInstanceIDsWSM.Utils.HistoryObjects
[in]bNewGroupPerInstancebool
Returns
aNewGroupIDs
json WSM.APICreateStringAttribute ( nHistoryID  ,
sKey  ,
sValue  ,
aObjIDs  ,
nCopyBehavior  ,
bIsSharedOnSplit   
)

Create a StringAttribute optionally attaching it to the given Objects.

The key must be non-empty or this operation fails. Also, each Object can only have one StringAttribute attached with a given key. It is an error to try to attach a second StringAttribute to an Object with a StringAttribute with the same key. Note this case is an error to avoid the creation of an unused StringAttribute. The migration behavior of the StringAttribute can be specified during copying and splitting. To set the copy behavior use WSM.nCopyBehavior nCB. Two examples are using the array tool and using copy/paste. See WSM_Constants.h for more information. When an Object is split, the StringAttribute will be shared with the split when bIsSharedOnSplit is true. Otherwise the split will not get the StringAttribute. Drawing an line across a Face to divide into 2 Faces is an example of a split. Parameters: In: nHistoryID, sKey, sValue, aObjIDs, nCopyBehavior, bIsSharedOnSplit Out: nStringAttributeID

Parameters
[in]nHistoryIDint
[in]sKeyString
[in]sValueString
[in]aObjIDsWSM.Utils.HistoryObjects
[in]nCopyBehavior(OPTIONAL, default = ( int )WSM.nCopyBehavior.nShareOrCopy) int
[in]bIsSharedOnSplit(OPTIONAL, default = true) bool
Returns
nStringAttributeID
json WSM.APICreateTexture ( nHistoryID  ,
aBitmapData  ,
bUseBitmapAlpha  ,
sTextureName   
)

APICreateTexture creates a new Texture object Parameters: In: nHistoryID, aBitmapData, sTextureName Out: nCreatedTextureID.

Parameters
[in]nHistoryIDint
[in]aBitmapDataArray of char
[in]bUseBitmapAlpha(OPTIONAL, default = true) bool
[in]sTextureName(OPTIONAL) String
Returns
nCreatedTextureID
json WSM.APICreateVertex ( nHistoryID  ,
position   
)

Create a Vertex with the given position.

Parameters: In: nHistoryID, position Out: nObjectID

Parameters
[in]nHistoryIDint
[in]positionWSM.Point3d
Returns
objID
json WSM.APIDebugObjectReadOnly ( nHistoryID  ,
nObjectID   
)

APIDebugObjectReadOnly() function.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
escaped
json WSM.APIDeleteAllHistories ( )

Delete all Histories and reset next History Id to be 0.

Returns
inst.GetResults().size()
json WSM.APIDeleteAllRedoHistory ( nHistoryID  ,
bReuseDiscardedObjectIDs   
)

APIDeleteAllRedoHistory - Deletes all forward Deltas.

If bReuseDiscardedObjectIDs is true, all the IDs that are only used in the forward Deltas will be released to be used again as required. Parameters: In: nHistoryID, bReuseDiscardedObjectIDs Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]bReuseDiscardedObjectIDs(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIDeleteHistory ( nHistoryID  )

Delete the given History and also the active history managed by ScriptInstance.

Parameters
[in]nHistoryIDint
Returns
inst.GetResults().size()
json WSM.APIDeleteObject ( nHistoryID  ,
nObjectID   
)

APIDeleteObject deletes nObjectID in the given nHistoryID.

Parameters: In: nHistoryID, nObjectID Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIDeleteObjects ( nHistoryID  ,
aObjectIDs   
)

APIDeleteObjects deletes a vector of aObjectIDs in the given nHistoryID.

Parameters: In: nHistoryID, aObjectIDs Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIDetectFreeEdgesReadOnly ( nHistoryID  ,
nEdgeIDs   
)

APIDetectFreeEdgesReadOnly Returns a list of edges that have only one or zero faces connected and a list of non free edges.

Parameters: In: nHistoryID, nEdgeIDs Out: A list of free and non-free edge ids.

Parameters
[in]nHistoryIDint
[in]nEdgeIDsWSM.Utils.HistoryObjects
Returns
{ { "aFreeEdges" , to_json(aFreeEdgeIDs) }, { "aNonFreeEdges" , to_json(aNonFreeEdgeIDs) } };
json WSM.APIDetectSilhouettesReadOnly ( nHistoryID  ,
nEdgeIDs  ,
cameraPos  ,
cameraDir  ,
bPerspectiveView  ,
bSmoothOnly   
)

APIDetectSilhouettesReadOnly Returns a list of silhouette edges from a list of edges.

Parameters: In: nHistoryID, nEdgeID, cameraPos, cameraDir, bPerspectiveView, bSmoothOnly Out: A list of silhouette edge IDs

Parameters
[in]nHistoryIDint
[in]nEdgeIDsWSM.Utils.HistoryObjects
[in]cameraPosWSM.Point3d
[in]cameraDirWSM.Vector3d
[in]bPerspectiveViewbool
[in]bSmoothOnlybool
Returns
aSilIDs
json WSM.APIDisableJournaling ( )

APIDisableJournaling() function.

Returns
journalFile;
json WSM.APIDragFace ( nHistoryID  ,
nObjectID  ,
nDistance  ,
bMerge   
)

APIDragFace drags a face nObjectID along it normal by nDistance.

nHistoryID and nToHistoryID can be the same. Parameters: In: nHistoryID, nObjectID, nDistance, bMerge Out:

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]nDistancedouble
[in]bMerge(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIDragFaces ( nHistoryID  ,
aaFaceIDs  ,
aDists  ,
aDirs  ,
bMerge   
)

APIDragFaces drags a group of faces aaFaceIDs by aDistance for each group.

nHistoryID and nToHistoryID can be the same. Parameters: In: nHistoryID, nObjectID, nDistance, bMerge Out:

Parameters
[in]nHistoryIDint
[in]aaFaceIDsArray of std.vector
[in]aDistsArray of double
[in]aDirs(OPTIONAL) Array of WSM.UnitVector3d
[in]bMerge(OPTIONAL) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIDumpResults ( )

Dump the list of Results managed by ScriptInstance.

Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEditCircleEdges ( nHistoryID  ,
nEdgeIDs  ,
radius  ,
center  ,
normal  ,
xaxis  ,
angle   
)

APIEditCircleEdges Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis.

Parameters
[in]nHistoryIDint
[in]nEdgeIDsWSM.Utils.HistoryObjects
[in]radiusdouble
[in]centerWSM.Point3d
[in]normalWSM.UnitVector3d
[in]xaxisWSM.UnitVector3d
[in]angle(OPTIONAL, default = 0.0) double
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEditCylinderFaces ( nHistoryID  ,
nFaceIDs  ,
radius  ,
center  ,
normal  ,
xaxis   
)

APIEditCylinderFaces Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis.

Parameters
[in]nHistoryIDint
[in]nFaceIDsWSM.Utils.HistoryObjects
[in]radiusdouble
[in]centerWSM.Point3d
[in]normalWSM.UnitVector3d
[in]xaxisWSM.UnitVector3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEditSphereFaces ( nHistoryID  ,
nFaceIDs  ,
radius  ,
center  ,
normal  ,
xaxis   
)

APIEditSphereFaces Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis.

Parameters
[in]nHistoryIDint
[in]nFaceIDsWSM.Utils.HistoryObjects
[in]radiusdouble
[in]centerWSM.Point3d
[in]normalWSM.UnitVector3d
[in]xaxisWSM.UnitVector3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEditSplineEdges ( nHistoryID  ,
nEdgeIDs  ,
aControlPoints  ,
bClosed  ,
startTangent  ,
endTangent   
)

APIEditSplineEdges Parameters: In: nHistoryID, nEdgeIDs, radius, center, normal, xaxis.

Parameters
[in]nHistoryIDint
[in]nEdgeIDsWSM.Utils.HistoryObjects
[in]aControlPointsArray of WSM.Point3d
[in]bClosedbool
[in]startTangentWSM.Vector3d
[in]endTangentWSM.Vector3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEnableJournaling ( nHistoryID  ,
sFilePath   
)

APIEnableJournaling If sFilePath is not provided, the journal will be stored in a string.

APIDisableJournaling will return the journal as a string. Parameters: In: nHistoryID, sFilePath, bIncludeReadOnly

Parameters
[in]nHistoryIDint
[in]sFilePath(OPTIONAL) String
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIEnableJournalingToString ( nHistoryID  )
json WSM.APIEnableJournalingTypes ( aTypes  )

APIEnableJournalingTypes() function.

Parameters
[in]aTypesArray of String
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIExtrudeEdges ( nHistoryID  ,
aProfileIDs  ,
 
)

APIExtrudeEdges makes a Face from the given profile and a transformed copy of the edges.

Parameters: In: nHistoryID, aProfileIDs, t Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]aProfileIDsWSM.Utils.HistoryObjects
[in]tWSM.Transf3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIFaceContainsPointReadOnly ( nHistoryID  ,
nFaceID  ,
point   
)

APIFaceContainsPointReadOnly() function.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]pointWSM.Point3d
Returns
bContains
json WSM.APIFlattenFaces ( nHistoryID  ,
aFaceIDs  ,
dTol   
)

Flattens all Faces given by aFaceIDs onto the plane of the first Face when all Faces lie within dTol of the first Face's plane, then merges into a single Face.

Note dTol is a relative tolerance based on the size of the bounding boxes of the given Faces. Parameters: In: nHistoryID, aFaceIDs, dTol Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]aFaceIDsWSM.Utils.HistoryObjects
[in]dTol(OPTIONAL, default = WSM_DISTANCE_TOL) double
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIFlattenGroupsOrInstances ( nHistoryID  ,
aGroupOrInstanceIDs  ,
bRecursive  ,
bImprint   
)

Replace the instances and/or groups referenced in aGroupOrInstanceIDs by a copy of the contents of the referenced history.

If bRecursive is true, repeat the process for all the new groups created by the copy. If bImprint is true, top level edges and faces from the group are imprinted into the model. If bImprint is false, top level edges become line meshes and top level faces are put into bodies.

Parameters
[in]nHistoryIDint
[in]aGroupOrInstanceIDsWSM.Utils.HistoryObjects
[in]bRecursivebool
[in]bImprint(OPTIONAL, default = true) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIGetActiveHistory ( )

Get the Active history managed by ScriptInstance.

Returns
inst.GetActiveHistory()
json WSM.APIGetAllAggregateTransf3dsReadOnly ( nReferencedHistoryID  ,
nTopMostHistoryID   
)

APIGetAllAggregateTransf3dsReadOnly returns aggregate global transformations on a History referenced by a Group or Groups.

Parameters: In: nReferencedHistoryID, nTopMostHistoryID Out: transforms, paths (vector of Transf3d, vector of GroupInstancePath).

Parameters
[in]nReferencedHistoryIDint
[in]nTopMostHistoryIDint
Returns
{ { "transforms" , to_json(aGroupAggregateTransf3dVec)}, { "paths" , to_json(aGroupAggregatePaths)} };
json WSM.APIGetAllConnectedNonOwnedReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetAllConnectedNonOwnedReadOnly returns an array of all NonOwned Object IDs that are connected to nObjectID.

Parameters: In: nHistoryID, nObjectID Out: Array of IDs.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aNonOwned
json WSM.APIGetAllHistoriesReadOnly ( bWithTemporary  )

APIGetAllHistoriesReadOnly Gets the IDs of all active histories, optionally with temporary ones.

In: bWithTemporary Out: array of IDs.

Parameters
[in]bWithTemporary(OPTIONAL, default = false) bool
Returns
aIDs
json WSM.APIGetAllHistoryDeltasReadOnly ( nHistoryID  )

Get the IDs of all deltas in the given history.

Parameters: In: nHistoryID Out: list of delta IDs

Parameters
[in]nHistoryIDint
Returns
aDeltaIDs
json WSM.APIGetAllNonOwnedReadOnly ( nHistoryID  )

APIGetAllNonOwnedReadOnly returns an array of all NonOwned Object IDs.

Parameters: In: nHistoryID Out: Array of IDs.

Parameters
[in]nHistoryIDint
Returns
aNonOwned
json WSM.APIGetAllObjectsByTypeReadOnly ( nHistoryID  ,
nType   
)

Returns all the objects of type 'nType' contained by the history Parameters: In: nHistoryID, nType nType- WSM.nObjectType.nUnSpecifiedType WSM.nObjectType.nBodyType WSM.nObjectType.nLumpType WSM.nObjectType.nShellType WSM.nObjectType.nFaceType WSM.nObjectType.nLoopType WSM.nObjectType.nCoedgeType WSM.nObjectType.nEdgeType WSM.nObjectType.nVertexType Out: Array of Object IDs of the given nType.

Parameters
[in]nHistoryIDint
[in]nTypeint
Returns
aObjectIDs
json WSM.APIGetAllReachableHistoriesReadOnly ( nHistoryID  ,
bGoUp   
)

Gets all the Histories reachable from the given History going either up or down the chain of Histories based on the flag bGoUp.

Note, includes itself. In: nHistoryId bGoUp Out: array of history IDs.

Parameters
[in]nHistoryIDint
[in]bGoUpbool
Returns
aIDs
json WSM.APIGetBodyEdgesReadOnly ( nHistoryID  ,
nBodyID   
)

APIGetBodyEdgesReadOnly returns an array of all edge IDs for the given nBodyID.

Parameters: In: nHistoryID, nBodyID Out: Array of edge IDs.

Parameters
[in]nHistoryIDint
[in]nBodyIDint
Returns
aEdgeIDs
json WSM.APIGetBodyFacesReadOnly ( nHistoryID  ,
nObjectID   
)

GetBodyFacesReadOnly returns an array of Face IDs.

Note this is a read only operation. Parameters: In: nHistoryID, nObjectID Out: Array of face IDs.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aFaceIDs
json WSM.APIGetBoxReadOnly ( nHistoryID  ,
nObjectID  ,
transf   
)

APIGetBoxReadOnly Parameters: In nHistoryID, nObjectID (Optional), transf (Optional) Out: Interval3d.

Parameters
[in]nHistoryIDint
[in]nObjectID(OPTIONAL, default = WSM.INVALID_ID) int
[in]transf(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
Returns
interval
json WSM.APIGetCoedgeDirectionReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetCoedgeDirectionReadOnly returns true if coedge and edge go in the same direction.

Note this is a read only operation. Parameters: In: nHistoryID, nObjectID Out: bForward

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
bForward
json WSM.APIGetConnectedEdgesReadOnly ( nHistoryID  ,
nEdgeID  ,
bBreakOnNonSmooth   
)

Returns all connected edges of a seed edge.

In: nHistoryID, nEdgeID, bBreakOnNonSmooth Out: Vector of connected Edge IDs.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
[in]bBreakOnNonSmoothbool
Returns
aConnectedEdges
json WSM.APIGetConvexityConnectedComponentReadOnly ( nHistoryID  ,
nLoopOrFaceID  ,
nConvexity   
)

APIGetConvexityConnectedComponentReadOnly Parameters: In: nHistoryID, nLoopOrFaceID, nConvexity Out: aConnectedFaces.

Parameters
[in]nHistoryIDint
[in]nLoopOrFaceIDint
[in]nConvexityint
Returns
{ { "aConnectedFaces" , to_json(aConnectedFaces)} };
json WSM.APIGetConvexityReadOnly ( nHistoryID  ,
nEdgeOrLoopID   
)

APIGetConvexityReadOnly returns the convexity of Edge or Loop ID.

Note this is a read only operation. Parameters: In: nHistoryID, nEdgeOrLoopID Out: nConvexity.

Parameters
[in]nHistoryIDint
[in]nEdgeOrLoopIDint
Returns
nConvexity
json WSM.APIGetCreatedChangedAndDeletedInActiveDeltaReadOnly ( nHistoryID  ,
nObjectType  ,
bForUndo   
)

APIGetCreatedChangedAndDeletedInActiveDeltaReadOnly Parameters: In: History ID, WSM.nObjectType nObjectType, bool bForUndo Out: Vector of Created, Vector of Changed, Vector of Deleted,.

Parameters
[in]nHistoryIDint
[in]nObjectTypeWSM.nObjectType
[in]bForUndo(OPTIONAL, default = false) bool
Returns
{ { "created" , to_json(aCreated)}, { "changed" , to_json(aChanged)}, { "deleted" , to_json(aDeleted)} };
json WSM.APIGetCreatedChangedAndDeletedInDeltaRangeReadOnly ( nHistoryID  ,
nStartDelta  ,
nEndDelta  ,
aObjectTypes   
)

APIGetCreatedChangedAndDeletedInDeltaRangeReadOnly Parameters: In: History ID, first Delta ID, second Delta ID, nObjectTypes Out: Vector of Created, Vector of Changed, Vector of Deleted,.

Parameters
[in]nHistoryIDint
[in]nStartDeltaint
[in]nEndDeltaint
[in]aObjectTypesArray of WSM.nObjectType
Returns
{ { "created" , to_json(aCreated)}, { "changed" , to_json(aChanged)}, { "deleted" , to_json(aDeleted)} };
json WSM.APIGetDatabaseVersionReadOnly ( )

APIGetDatabaseVersionReadOnly Parameters: In: Out: JSON.

Returns
{ { "nMajorVer" , to_json(nMajorVer)},{ "nMinorVer" , to_json(nMinorVer)} };
json WSM.APIGetDynamoModelInformationReadOnly ( nHistoryID  )

APIGetDynamoModelInformationReadOnly returns Dynamo Model information of the history.

Parameters: In: nHistoryID Out: id, name, config, delta

Parameters
[in]nHistoryIDint
Returns
{ { "id" , to_json( id )}, { "name" , to_json(name)}, { "config" , to_json(config)}, { "delta" , to_json(delta)} };
json WSM.APIGetEdgeOrVertexMarkedSmoothReadOnly ( nHistoryID  ,
nObjectID   
)

GetEdgeMarkedSmoothReadOnly Returns whether an edge is marked as smooth.

If bIsSmooth is returned 'false', this may mean either that the edge is non-smooth or its smoothness is unknown. Parameters: In: HistoryID, EdgeID (the edge in question) Out: bool (true or false, the edge in question is marked as smooth)

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
bIsSmooth
json WSM.APIGetEdgePointsReadOnly ( nHistoryID  ,
nEdgeID   
)

Get edge endpoints directly.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
Returns
{ { "start" , to_json(start)}, { "end" , to_json(end)} };
json WSM.APIGetEdgeStyleReadOnly ( nHistoryID  ,
nEdgeID   
)

Get the style of an edge.

If no style is found, the color defaults to black (0). Note only Edges, Instances, and LineMeshes can have edge styles.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
Returns
{ { "color" , to_json(nColor)} };
json WSM.APIGetEnabledJournalingTypesReadOnly ( )

APIGetEnabledJournalingTypesReadOnly returns the list of journaling 'types' that are enabled.

In: Out: Vector of enabled string types.

Returns
types
json WSM.APIGetFaceBacksideMaterialReadOnly ( nHistoryID  ,
nFaceID   
)

Gets the material of the backside of the given face.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
nMaterialID
json WSM.APIGetFaceCentroidPoint3dReadOnly ( nHistoryID  ,
nFaceID   
)

APIGetFaceCentroidPoint3dReadOnly returns the centroid point of nFaceID.

Note this is a read only operation. Parameters: In: nHistoryID, nFaceID Out: Centroid.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
centroidPt
json WSM.APIGetFaceConnectedComponentReadOnly ( nHistoryID  ,
nFaceID  ,
bUseVertices  ,
bSmooth   
)

APIGetFaceConnectedComponentReadOnly Parameters: In: nHistoryID, nFaceID, bUseVertices, bSmooth Out: aConnectedFaces.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]bUseVerticesbool
[in]bSmoothbool
Returns
{ { "aConnectedFaces" , to_json(aConnectedFaces)} };
json WSM.APIGetFaceFacetsReadOnly ( nHistoryID  ,
nFaceID   
)

APIGetFaceFacetsReadOnly gets the list of vertices grouped by triangles Parameters: In: nHistoryID, nFaceID Out: aFacets.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
aFacets
json WSM.APIGetFacePlaneReadOnly ( nHistoryID  ,
nFaceID   
)

GetFacePlaneReadOnly returns the plane of nFaceID.

Note this is a read only operation. Parameters: In: nHistoryID, nFaceID Out: Plane.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
plane
json WSM.APIGetFaceUVDataAttributeUVsReadOnly ( nHistoryID  ,
nFaceUVDataAttributeID   
)

Gets the UVs from a FaceUVDataAttribute.

Note either the number of front UVs equals the number of Vertices on the owning Face and are in the same order, or there are none. The same condition applies to back UVs. In: nHistoryID, nFaceUVDataAttributeID Out: Front and Back UVs

Parameters
[in]nHistoryIDint
[in]nFaceUVDataAttributeIDint
Returns
{ { "front_uvs" , to_json(aFrontUVs) }, { "back_uvs" , to_json(aBackUVs) }, { "vertices" , to_json(aVertexIDs)} };
json WSM.APIGetFaceUVDataTransformReadOnly ( nHistoryID  ,
nFaceID  ,
bBackSide   
)

Gets the 2d transform, returned as a 3d transform, for the uvs on the given Face.

If the Face has no FaceUVDataAttribute, this transformation will be the identity. If the Face has transformed uvs, the returned transform can be passed to APISetFaceUVDataAttributes to transform the uvs for a Face with the flag bPostTransform set to true. If bBackSide is true, gets the transform for the back Material uvs otherwise gets the front uvs transform. Note uv offsets are not returned as these are not helpful when applying the map to new Faces. In: nHistoryID, nFaceID, bBackSide Out: A transform3d

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]bBackSide(OPTIONAL, default = false) bool
Returns
{ { "uv_transform" , to_json(transf3d) }, { "plane_transform" , to_json(planeTransf3d) } };
json WSM.APIGetFaceVariantReadOnly ( nHistoryID  ,
nFaceID   
)

APIGetFaceVariantReadOnly returns the variant of nFaceID.

Note this is a read only operation. Parameters: In: nHistoryID, nFaceID Out: dVariant.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
dVariant
json WSM.APIGetFaceVertexNormalsReadOnly ( nHistoryID  ,
nFaceID   
)

APIGetFaceVertexNormalsReadOnly returns the plane of nFaceID.

Note this is a read only operation. Parameters: In: nHistoryID, nFaceID Out: aVertexNormals.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
aVertexIDsAndNormals
json WSM.APIGetGroupReferencedHistoryReadOnly ( nHistoryID  ,
nGroupOrInstanceID  ,
bDeletedInstanceOK  ,
nDeltaOffset   
)

APIGetGroupReferencedHistoryReadOnly returns the ID of the Group's or Instance's referenced History Parameters: In: nHistoryID, nGroupOrInstanceID, bDeletedInstanceOK, nDeltaOffset Out: nReferencedHistoryID.

Parameters
[in]nHistoryIDint
[in]nGroupOrInstanceIDint
[in]bDeletedInstanceOK(OPTIONAL, default = false) bool
[in]nDeltaOffset(OPTIONAL, default = 0) int
Returns
nReferencedHistoryID
json WSM.APIGetHistoryDeltasReadOnly ( nHistoryID  ,
nStartDeltaID  ,
nEndDeltaID   
)

Get the IDs of the deltas in the given closed range in the given history.

Parameters
[in]nHistoryIDint
[in]nStartDeltaIDint
[in]nEndDeltaIDint
Returns
aDeltaIDs
json WSM.APIGetHistoryReferencingGroupsReadOnly ( nHistoryID  )

Returns a vector with groups that reference this history.

In: nHistoryID Out: Vector of Group ObjectIDs.

Parameters
[in]nHistoryIDint
Returns
aObjectIDs
json WSM.APIGetIdOfActiveDeltaReadOnly ( nHistoryID  ,
nDeltaOffset   
)

Get the active Delta ID.

Parameters: In: nHistoryID, nDeltaID, nDeltaOffset (optional) Out: ID.

Parameters
[in]nHistoryIDint
[in]nDeltaOffset(OPTIONAL, default = 0) int
Returns
nDeltaID
json WSM.APIGetImageDataReadOnly ( nHistoryID  ,
nImageID   
)

APIGetImageDataReadOnly gets image data Parameters: In: nHistoryID, nImageID Out: sName, nTextureID, nPosition, fAlphaValue, bFeaturesVisible, aCorners, bHasSatelliteData.

Parameters
[in]nHistoryIDint
[in]nImageIDint
Returns
{ { "sName" , to_json(sName)}, { "nTextureID" , to_json(nTextureID)}, { "nPosition" , to_json(nPosition)}, { "fAlphaValue" , to_json(fAlphaValue)}, { "bFeaturesVisible" , to_json(bFeaturesVisible)}, { "bHasSatelliteData" , to_json(bHasSatelliteData)}, { "aCorners" , to_json(aCornersVec)} };
json WSM.APIGetInstanceTransf3dReadOnly ( nHistoryID  ,
nInstanceID   
)

Returns the Instance's Transf3d.

In: nHistoryID, nInstanceID Out: Instance's Transf3d

Parameters
[in]nHistoryIDint
[in]nInstanceIDint
Returns
t
json WSM.APIGetInvalidID ( )

APIGetInvalidID Parameters: In: Out: ID.

Returns
WSM.INVALID_ID
json WSM.APIGetLastDeltaIDReadOnly ( nHistoryID  ,
nBeforeLast   
)

Get the ID of the target Delta, which is nBeforeLast before the last Delta (even for zero nBeforeLast, it may be different from the active Delta ID, if there are available Redo states).

Parameters
[in]nHistoryIDID of the given History
[out]nLastDeltaIDThe returned ID of the target Delta
[in]nBeforeLastThe offset between the target Delta and the last Delta Out: ID of the target Delta
[in]nHistoryIDint
[in]nBeforeLast(OPTIONAL, default = 0) int
Returns
id
json WSM.APIGetLayerDataReadOnly ( nHistoryID  ,
nLayerID   
)

Get the data from a layer.

Parameters
[in]nHistoryIDint
[in]nLayerIDint
Returns
{ { "name" , to_json(name)}, { "displayed" , to_json(bDisplayed)} };
json WSM.APIGetLevelDataReadOnly ( nHistoryID  ,
nLevelID   
)

APIGetLevelDataReadOnly gets the elevation and name properties.

Parameters: In: nHistoryID, nLevelID Out: sLevelName, dElevation

Parameters
[in]nHistoryIDint
[in]nLevelIDint
Returns
{ { "dElevation" , to_json(dElevation)}, { "sLevelName" , to_json(sLevelName)} };
json WSM.APIGetLineMeshDataReadOnly ( nHistoryID  ,
nLineMeshID   
)

Get the data from a LineMesh.

Parameters: In: nHistoryID, nLineMeshID Out: The line mesh data.

Parameters
[in]nHistoryIDint
[in]nLineMeshIDint
Returns
{ { "points" , to_json(aPoints) }, { "indices" , to_json(aIndices) }, { "counts" , to_json(aCounts) } };
json WSM.APIGetLocalCoordinateSystemReadOnly ( nHistoryID  )

Get the LCS (local coordinate system) of the given History.

Parameters: In: nHistoryID Out: transf3d.

Parameters
[in]nHistoryIDint
Returns
transf3d
json WSM.APIGetMaterialDataReadOnly ( nHistoryID  ,
nMaterialID   
)

APIGetMaterialDataReadOnly gets the Material properties.

Parameters: In: nHistoryID, nMaterialID Out: JSON object with data

Parameters
[in]nHistoryIDint
[in]nMaterialIDint
Returns
{ { "nColor" , to_json(nColor)}, { "dHorizontalScale" , to_json(dHorizontalScale)}, { "dVerticalScale" , to_json(dVerticalScale)}, { "nTextureID" , to_json(nTextureID)}, { "sMaterialName" , to_json(sMaterialName)}, { "sMaterialIdentifier" , to_json(sMaterialIdentifier)}, { "aAdditionalRenderData" , to_json(aAdditionalRenderData)}, { "aAdditionalTextures" , to_json(aAdditionalTextures) }, { "aObjectsUsingMaterial" , to_json(aObjectsUsingMaterial)} };
json WSM.APIGetMemorySizeReadOnly ( nHistoryID  ,
bCollapsedHistoryWithLiveObjsOnly   
)

APIGetMemorySizeReadOnly Parameters: In: nHistoryID Out: nBytes.

Parameters
[in]nHistoryIDint
[in]bCollapsedHistoryWithLiveObjsOnly(OPTIONAL) bool
Returns
nBytes
json WSM.APIGetMeshDataReadOnly ( nHistoryID  ,
nMeshID   
)

Get the data from a Mesh.

Parameters: In: nHistoryID, nMeshID Out: The mesh data.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
Returns
{ { "points" , to_json(aPoints) }, { "triangles" , to_json(aTriangles) }, { "normals" , to_json(aNormals) }, { "uvs" , to_json(aUVs) }, { "colors" , to_json(aColors) } };
json WSM.APIGetObjectAttributesReadOnly ( nHistoryID  ,
nObjectID   
)

Get all of the Attributes of the given Object.

Parameters: In: nHistoryID, nObjectID Out: Array of Attribute IDs of the given nType.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aObjectIDs
json WSM.APIGetObjectLayersReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetObjectLayersReadOnly gets all layer ids of the given object.

Parameters: In: nHistoryID, nObjectID Out: aLayersIDs

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aLayersIDs
json WSM.APIGetObjectLevelsReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetObjectLevelsReadOnly gets all level's ids of the given object.

Parameters: In: nHistoryID, nObjectID Out: aLevelsIDs

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aLevelsIDs
json WSM.APIGetObjectMaterialReadOnly ( nHistoryID  ,
nFaceID   
)

APIGetObjectMaterialReadOnly gets an Object's material.

Parameters: In: nHistoryID, nObjectID Out: nMaterialID

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
nMaterialID
json WSM.APIGetObjectNameReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetObjectNameReadOnly returns an object type.

Note this is a read only operation. Parameters: In: nHistoryID, nObjectID, Out: nName

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{ { "objectName" , to_json(nName)} };
json WSM.APIGetObjectPropertiesReadOnly ( nHistoryID  ,
nObjectID   
)

Gets the properties of a given object (Body): A name and if that particular body reports its area by level or not Parameters: In: nHistoryID, nObjectID, Out: sObjectName, bReportAreaByLevel.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
{ { "sObjectName" , to_json(sObjectName)}, { "bReportAreaByLevel" , to_json(bReportAreaByLevel)} };
json WSM.APIGetObjectsByTypeReadOnly ( nHistoryID  ,
nObjectID  ,
nType  ,
bUpstream   
)

Returns all the objects of type 'nType' contained by the Object the given nObjectID if bUpstream is false; otherwise, return all the objects of type "nType" which are the parents of given object.

Note this is a read only operation. Parameters: In: nHistoryID, nObjectID, nType, bUpstream nType- WSM.nObjectType.nUnSpecifiedType WSM.nObjectType.nBodyType WSM.nObjectType.nLumpType WSM.nObjectType.nShellType WSM.nObjectType.nFaceType WSM.nObjectType.nLoopType WSM.nObjectType.nCoedgeType WSM.nObjectType.nEdgeType WSM.nObjectType.nVertexType Out: Array of Object IDs of the given nType.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]nTypeint
[in]bUpstream(OPTIONAL, default = false) bool
Returns
aObjectIDs
json WSM.APIGetObjectTextureCoordinatesReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetObjectTextureCoordinatesReadOnly generates tex coords for body or single face Parameters: In: nHistoryID, nObjectID Out: aTexCoords.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aTexCoords
json WSM.APIGetObjectTypeReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetObjectTypeReadOnly returns an object type.

Note this is a read only operation. Parameters: In: nHistoryID, nObjectID, Out: nType- WSM.nObjectType.nUnSpecifiedType WSM.nObjectType.nBodyType WSM.nObjectType.nLumpType WSM.nObjectType.nShellType WSM.nObjectType.nFaceType WSM.nObjectType.nLoopType WSM.nObjectType.nCoedgeType WSM.nObjectType.nEdgeType WSM.nObjectType.nVertexType

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
nType
json WSM.APIGetPointMeshDataReadOnly ( nHistoryID  ,
nPointMeshID   
)

Get the data from a PointMesh.

Parameters: In: nHistoryID, nPointMeshID Out: The point mesh data.

Parameters
[in]nHistoryIDint
[in]nPointMeshIDint
Returns
aPoints
json WSM.APIGetPointsFromObjectIDsReadOnly ( nHistoryID  ,
aIDs   
)

Helper function used in sweeping to get points from the profile or path Objects.

The parameter aIDs can be a a single face or multiple edges. In: nHistoryID, vector of Object IDs Out: Vector of Vertex IDs

Parameters
[in]nHistoryIDint
[in]aIDsWSM.Utils.HistoryObjects
Returns
aVertices
json WSM.APIGetRenderableFaceReadOnly ( nHistoryID  ,
nFaceID  ,
bCalculateTexCoords  ,
bBackSide   
)

Returns vertices in groups of 3 (triangles), with associated normals and optionally texture coordinates.

If bBackSide is true, then the data is returned for drawing the back side of the face. This means that the facet triangles are ordered in the opposite direction and the normals are reversed. Out: vertices, normals, texCoords

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]bCalculateTexCoordsbool
[in]bBackSide(OPTIONAL, default = false) bool
Returns
{ { "vertices" , to_json(vertices)}, { "normals" , to_json(normals)}, { "texCoords" , to_json(texCoords)} };
json WSM.APIGetResultsCount ( )

Get the number of Results managed by ScriptInstance.

Returns
numResults
json WSM.APIGetRevitFamilyInformationReadOnly ( nHistoryID  )

APIGetRevitFamilyInformationReadOnly returns Revit Family information of the history.

Parameters: In: nHistoryID Out: bIsGeneratedFromRFA, bIsGeneratedFromBuiltinRFA, familyCategory, familyReference, familyType, familyExtraData

Parameters
[in]nHistoryIDint
Returns
{ { "bIsGeneratedFromRFA" , to_json(bIsGeneratedFromRFA)}, { "bIsGeneratedFromBuiltinRFA" , to_json(bIsGeneratedFromBuiltinRFA)}, { "familyCategory" , to_json(familyCategory)}, { "familyReference" , to_json(familyReference)}, { "familyType" , to_json(familyType)}, { "familyExtraData" , to_json(familyExtraData)} };
json WSM.APIGetSatelliteDataReadOnly ( nHistoryID  ,
nImageID   
)

APIGetSatelliteDataReadOnly gets satellite data from image Parameters: In: nHistoryID, nImageID Out: sName, nTextureID, nPosition, fAlphaValue, bFeaturesVisible, aCorners, bHasSatelliteData.

Parameters
[in]nHistoryIDint
[in]nImageIDint
Returns
{ { "coordinates" , to_json(coordinates)}, { "coordinatesSpan" , to_json(coordinatesSpan)}, { "aPixelDimensions" , to_json(aPixelDim)} };
json WSM.APIGetStringAttributeKeyValueReadOnly ( nHistoryID  ,
nStringAttributeID   
)

Gets the key and value strings from a StringAttribute.

Also returns owners. Parameters: In: nHistoryID, nStringAttributeID Out: Object: {sKey, sValue, aOwnerIDs}

Parameters
[in]nHistoryIDint
[in]nStringAttributeIDint
Returns
j;
json WSM.APIGetStringAttributesByKeyReadOnly ( nHistoryID  ,
nObjectID  ,
sKey   
)

Returns all StringAttributes attached to the Object given by nObjectID with key matching sKey.

Note if nObjectID is WSM.INVALID_ID, then returns all StringAttributes in the History with key sKey. This is a read only operation. In: nHistoryID, nObjectID, sKey Out: aStringAttributeIDs

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]sKeyString
Returns
aStringAttributeIDs
json WSM.APIGetTextureDataReadOnly ( nHistoryID  ,
nTextureID   
)

APIGetTextureDataReadOnly gets a Texture object's bitmap data Parameters: In: nHistoryID, nTextureID Out: JSON object with data.

Parameters
[in]nHistoryIDint
[in]nTextureIDint
Returns
{ { "bitmap" , to_json(bitmapDataInt)}, { "bUseBitmapAlpha" , to_json(bUseBitmapAlpha)}, { "sTextureName" , to_json(sTextureName)} };
json WSM.APIGetTopLevelOwnersReadOnly ( nHistoryID  ,
nObjectID   
)

APIGetTopLevelOwnersReadOnly returns the top level owners of the given Object.

Parameters: In: nHistoryID, nObjectID Out: aOwnerIDs.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
aOwnerIDs
json WSM.APIGetVersionReadOnly ( )

APIGetVersionReadOnly Parameters: In: Out: JSON.

Returns
{ { "nMajorVer" , to_json(nMajorVer)}, { "nMinorVer" , to_json(nMinorVer)}, { "nRevisionVer" , to_json(nRevisionVer)} };
json WSM.APIGetVertexPoint3dReadOnly ( nHistoryID  ,
nVertexID   
)

APIGetVertexPoint3d returns the Point3d of a Vertex Parameters: In: nHistoryID, nVertexID Out: pt.

Parameters
[in]nHistoryIDint
[in]nVertexIDint
Returns
pt
json WSM.APIImprint ( nHistoryID  ,
nObjectID1  ,
nObjectID2  ,
bChangeBoth   
)

APIImprint Parameters: In: nHistoryID, nObjectID1, nObjectID2, bChangeBoth Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nObjectID1int
[in]nObjectID2int
[in]bChangeBothbool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIImprintWithPlane ( nHistoryID  ,
nObjectID  ,
plane   
)

APIImprintWithPlane Parameters: In: nHistoryID, nObjectID, plane Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]planeWSM.Plane
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIIntersectsNegativeSideOfPlanesReadOnly ( nHistoryID  ,
aPlanes  ,
bVertices  ,
bEdges  ,
bFaces  ,
bStrict  ,
dTol  ,
line3dPickRay  ,
bSearchInGroups  ,
bPickInstances  ,
aIgnoreObjects  ,
bOneOnlyTest   
)
json WSM.APIIsEdgeManifoldReadOnly ( nHistoryID  ,
nEdgeID   
)

Returns whether an edge has exactly two coedges on two distinct faces.

Some manifold cases, such as a dangling edge inside a face, will return false. Parameters: In: nHistoryID, nEdgeID Out: bool (isManifold)

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
Returns
bIsManifold
json WSM.APIIsEdgeMergeableReadOnly ( nHistoryID  ,
nEdgeID  ,
bUseMaterial   
)

APIIsEdgeMergeableReadOnly In: nHistoryID, nEdgeID, bUseMaterial Out:bool (true or false that the Edge is mergeable.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
[in]bUseMaterial(OPTIONAL, default = false) bool
Returns
bIsMergeable
json WSM.APIIsEdgeOnCircleReadOnly ( nHistoryID  ,
nEdgeID   
)

APIIsEdgeOnCircleReadOnly Parameters: In: nHistoryID, nEdgeID Out: radius, center, normal, xaxis, aAllCircleSiblings, bHasCircleAttribute.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
Returns
{ { "radius" , to_json(radius)}, { "center" , to_json(center)}, { "normal" , to_json(normal)}, { "xaxis" , to_json(xaxis)}, { "aAllCircleSiblings" , to_json(aAllCircleSiblings)}, { "bHasCircleAttribute" , to_json(bHasCircleAttribute)} };
json WSM.APIIsEdgeOnSplineReadOnly ( nHistoryID  ,
nEdgeID   
)

APIIsEdgeOnSplineReadOnly Parameters: In: nHistoryID, nEdgeID Out: aControlPoints, bClosed, startTangent, endTangent, aAllSplineSiblings, bHasSplineAttribute.

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
Returns
{ { "aControlPoints" , to_json(aControlPoints)}, { "bClosed" , to_json(bClosed)}, { "startTangent" , to_json(startTangent)}, { "endTangent" , to_json(endTangent)}, { "aAllSplineSiblings" , to_json(aAllSplineSiblings)}, { "bHasSplineAttribute" , to_json(bHasSplineAttribute)} };
json WSM.APIIsEdgeSilhouetteReadOnly ( nHistoryID  ,
nEdgeID  ,
cameraPos  ,
cameraDir  ,
bPerspectiveView   
)

APIIsEdgeSilhouetteReadOnly Returns whether an edge is a silhouette.

Parameters: In: nHistoryID, nEdgeID, cameraPos, cameraDir, bPerspectiveView Out: bool (true or false, the edge in question is a silhouette)

Parameters
[in]nHistoryIDint
[in]nEdgeIDint
[in]cameraPosWSM.Point3d
[in]cameraDirWSM.Vector3d
[in]bPerspectiveViewbool
Returns
bIsSilhouette
json WSM.APIIsExactMatchReadOnly ( nHistoryID1  ,
nHistoryID2  ,
nObjectID1  ,
nObjectID2   
)

API compares either two Histories or two Objects and sets bIsExact to true when they match exactly.

If both nObjectID1 and nObjectId2 are WSM.INVALID_ID then the Histories are compared, otherwise the Objects are compared. In: nHistoryID1, nHistoryID2, nObjectID1, nObjectID2 Out:bool true or false as there is an exact match

Parameters
[in]nHistoryID1int
[in]nHistoryID2int
[in]nObjectID1(OPTIONAL, default = WSM.INVALID_ID) int
[in]nObjectID2(OPTIONAL, default = WSM.INVALID_ID) int
Returns
bIsExact
json WSM.APIIsFaceOnBlendReadOnly ( nHistoryID  ,
nFaceID   
)

APIIsFaceOnBlendReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, aPathPoints, aAllBlendSiblings, bHasBlendAttribute.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
{ { "radius" , to_json(radius)}, { "aPathPoints" , to_json(aPathPoints)}, { "aAllBlendSiblings" , to_json(aAllBlendSiblings)}, { "bHasBlendAttribute" , to_json(bHasBlendAttribute)} };
json WSM.APIIsFaceOnCylinderReadOnly ( nHistoryID  ,
nFaceID   
)

APIIsFaceOnCylinderReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, center, normal, xaxis, aAllCylinderSiblings, bHasCylinderAttribute.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
{ { "radius" , to_json(radius)}, { "center" , to_json(center)}, { "normal" , to_json(normal)}, { "xaxis" , to_json(xaxis)}, { "aAllCylinderSiblings" , to_json(aAllCylinderSiblings)}, { "bHasCylinderAttribute" , to_json(bHasCylinderAttribute)} };
json WSM.APIIsFaceOnExtrudeReadOnly ( nHistoryID  ,
nFaceID   
)

APIIsFaceOnExtrudeReadOnly Parameters: In: nHistoryID, nFaceID Out: base, axis, xaxis, aControlPoints, bClosed, startTangent, endTangent, aAllExtrudeSiblings, bHasExtrudeAttribute.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
{ { "base" , to_json(base)}, { "axis" , to_json(axis)}, { "xaxis" , to_json(xaxis)}, { "aControlPoints" , to_json(aControlPoints)}, { "startTangent" , to_json(startTangent)}, { "endTangent" , to_json(endTangent)}, { "bClosed" , to_json(bClosed)}, { "aAllExtrudeSiblings" , to_json(aAllExtrudeSiblings)}, { "bHasExtrudeAttribute" , to_json(bHasExtrudeAttribute)} };
json WSM.APIIsFaceOnSphereReadOnly ( nHistoryID  ,
nFaceID   
)

APIIsFaceOnSphereReadOnly Parameters: In: nHistoryID, nFaceID Out: radius, center, normal, xaxis, aAllSphereSiblings, bHasSphereAttribute.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
Returns
{ { "radius" , to_json(radius)}, { "center" , to_json(center)}, { "normal" , to_json(normal)}, { "xaxis" , to_json(xaxis)}, { "aAllSphereSiblings" , to_json(aAllSphereSiblings)}, { "bHasSphereAttribute" , to_json(bHasSphereAttribute)} };
json WSM.APIIsHistoryLiveReadOnly ( nHistoryID  )

APIIsHistoryLiveReadOnly checks if an history is alive Parameters: In: nHistoryID Out: bIsLive.

Parameters
[in]nHistoryIDint
Returns
bIsLive
json WSM.APIIsHistoryNonTemporaryReadOnly ( nHistoryID  )

Returns whether a history is temporary or not.

Parameters
[in]nHistoryIDint
Returns
isNonTemporary
json WSM.APIIsJournalingReadOnly ( )

Check if Journaling is enabled.

In: Out: bool

Returns
bIsJournaling
json WSM.APIIsMeshManifoldReadOnly ( nHistoryID  ,
nMeshID   
)

Returns true if the Mesh is manifold, i.e.

every edge in the mesh is on an even number of triangles and is used in an equal number of times forward and backward on the triangles. Parameters: In: nHistoryID, nMeshID Out: Boolean.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
Returns
bIsManifold
json WSM.APIIsNonOwnedReadOnly ( nHistoryID  ,
nObjectID   
)

APIIsNonOwnedReadOnly returns whether this object has an owner.

Parameters: In: nHistoryID, nObjectID Out: bNonOwned

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
bNonOwned
json WSM.APIIsObjectLiveReadOnly ( nHistoryID  ,
nObjectID   
)

APIIsObjectLiveReadOnly checks if an object is alive in history Parameters: In: nHistoryID, nObjectID Out: bIsLive.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
Returns
bIsLive
json WSM.APILineMeshContainsPointReadOnly ( nHistoryID  ,
nLineMeshID  ,
point   
)

Returns true if the LineMesh contains the point.

Parameters: In: nHistoryID, nLineMeshID, point Out: Boolean.

Parameters
[in]nHistoryIDint
[in]nLineMeshIDint
[in]pointWSM.Point3d
Returns
bContainsPoint
json WSM.APILineMeshGetPointsOnNegativeSideOfPlanesReadOnly ( nHistoryID  ,
nLineMeshID  ,
aPlanes  ,
line3dPickRay  ,
dTol   
)

Get all points nearest the given line from segments of the LineMesh that lie on the negative side of all the given Planes.

In: nHistoryID, nLineMeshID, aPlanes, line3dPickRay, dTol Out: points and segments.

Parameters
[in]nHistoryIDint
[in]nLineMeshIDint
[in]aPlanesArray of WSM.Plane
[in]line3dPickRayWSM.Line3d
[in]dTol(OPTIONAL, default = WSM_MACHINE_TOL) double
Returns
{ { "points" , to_json(aPoints) }, { "segments" , to_json(aSegments) } };
json WSM.APILinkMeshesForConversion ( nHistoryID  ,
aMeshIDs   
)

Link the Meshes with a shared string Attribute.

This will be used when converting from Meshes to Bodies to unite all the Bodies into one. Note this linking happens automatically when converting from a Body to Meshes so in general this API should not be called except in very rare cases.

Parameters
[in]nHistoryIDint
[in]aMeshIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APILoadAXMFile ( nHistoryID  ,
sFilePath  ,
isImport  ,
logOutputPath   
)

Load an AXM file, both pre WSM and current.

For pre WSM, it translates the following legacy data :

  • AModeler Solids, including transform and meta data
  • Materials
  • Textures
  • Levels
  • Project settings : convert the grid rotation to LCS If defaultTextures is non null, the 10 default textures are supplied via a vector of pixel data. For pre WSM and current : If isImport is true, the axm file is added to an existing project. This means :
  • Satellite images are skipped
  • The LCS is skipped
  • Duplicate objects that have the Object.nShareOrCopy copy behavior are avoided
  • images are sorted properly If logOutputPath is specified (non ""), a log will be written to that file which contains detailed info about the conversion. Can be used by the test harness to measure conversion success. Parameters: In: nHistoryID, sFilePath, isImport, logOutputPath Out: JSON_UNDEFINED;
    Parameters
    [in]nHistoryIDint
    [in]sFilePathString
    [in]isImport(OPTIONAL, default = false) bool
    [in]logOutputPath(OPTIONAL, default = {}) String
    Returns
    JSON_UNDEFINED, i.e. {}
json WSM.APILoadDeltaFromBinaryFile ( nHistoryID  ,
sFilePath   
)

Load Delta from a binary file and add it to the History.

Parameters: In: nHistoryID, sFilePath Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]sFilePathString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APILoadDeltaFromBinaryString ( nHistoryID  ,
base64Str  ,
nDeltaID  ,
base64encoded   
)

APILoadDeltaFromBinaryString Parameters: In: nHistoryID, base64Str, [nDeltaID, [base64encoded]] Out: nDeltaID.

Parameters
[in]nHistoryIDint
[in]base64StrString
[in]nDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
[in]base64encoded(OPTIONAL, default = true) bool
Returns
nDeltaID
json WSM.APILoadFromFacets ( nHistoryID  ,
facetsData  ,
nOptions  ,
dMaxDistanceFromOrigin  ,
dRemoveDuplicateTol   
)

Parameters: In: nHistoryID, facetsData, nOptions, dMaxDistanceFromOrigin, dRemoveDuplicateTol Out: IDs of created objects.

Parameters
[in]nHistoryIDint
[in]facetsDataArray of WSM.FacetsBodyData
[in]nOptions(OPTIONAL, default = to_ut(WSM.nLoadingOptions.Merge | WSM.nLoadingOptions.RemoveDuplicate | WSM.nLoadingOptions.CreateMesh)) int
[in]dMaxDistanceFromOrigin(OPTIONAL, default = 0.0) double
[in]dRemoveDuplicateTol(OPTIONAL, default = WSM_MACHINE_TOL) double
Returns
createdObjectIDs
json WSM.APILoadFromFile ( nHistoryID  ,
sFilePath  ,
eFileType  ,
nOptions  ,
dMaxDistanceFromOrigin  ,
dScaleFactor   
)

APILoadFromFile Parameters: In: nHistoryID, sFilePath, eFileType, nOptions, dMaxDistanceFromOrigin, dScaleFactor Out: iObjectIdOffset.

Parameters
[in]nHistoryIDint
[in]sFilePathString
[in]eFileType(OPTIONAL, default = WSM.nFileTypeBinaryWSM) WSM.nFileType
[in]nOptions(OPTIONAL, default = to_ut(WSM.nLoadingOptions.RemoveDuplicate | WSM.nLoadingOptions.Merge | WSM.nLoadingOptions.CreateMesh)) int
[in]dMaxDistanceFromOrigin(OPTIONAL, default = 0.0) double
[in]dScaleFactor(OPTIONAL, default = 1.0) double
Returns
iObjectIdOffset
json WSM.APILoadFromString ( nHistoryID  ,
saveString  ,
eFileType  ,
nOptions  ,
dMaxDistanceFromOrigin  ,
dScaleFactor   
)

Load a model from a string containing serialization of one of the supported types.

For nFileTypeBinaryWSM, *pObjectIdOffset returns object ID offset required to load the new Objects into a non-empty History without ID conflicts. nOptions contains bit flags as specified in WSM.nLoadingOptions, that describe options used by the various file types (has no effect on loading the default type, nFileTypeBinaryWSM). For nFileTypeSTL, if WSM.nLoadingOptions.Merge is specified under options, merges out all merge-able Edges and Vertices. if WSM.nLoadingOptions.CreateMesh is specified, creates a Mesh instead of a Body. For nFileTypeOBJ, if WSM.nLoadingOptions.Merge is specified under options, merges out all merge-able Edges and Vertices. if WSM.nLoadingOptions.RemoveDuplicate is specified under options, removes duplicated vertices and edges within each body if WSM.nLoadingOptions.PlaceOnGround is specified under options, makes the smallest z axis coordinate of the whole model to be 0 if WSM.nLoadingOptions.CreateMesh is specified, creates a Mesh instead of a Body. If dMaxDistanceFromOrigin is greater than zero and the minimum corner of the bounding box around facetsData is further away than dMaxDistanceFromOrigin from the origin, then the created WSM geometry will be moved so the minimum corner of the bounding box is at the origin. Currently this only affects OBJ. Note that, unlike APILoadFromFile, nLoadingOptions.PlaceOnGround option is off by default. Set bBase64Encoded to true, if the string was base64 encoded when it was saved. The created Object is scaled by dScaleFactor for STL and OBJ.

Parameters
[in]nHistoryIDID of the given History
[in]sInputString
[in]eFileType
[in]nOptions
[in]dMaxDistanceFromOrigin
[in]bBase64Encoded
[in]dScaleFactorParameters: In: nHistoryID, saveString, eFileType, nOptions, dMaxDistanceFromOrigin, dScaleFactor Out: offset
[in]nHistoryIDint
[in]saveStringString
[in]eFileType(OPTIONAL, default = WSM.nFileTypeBinaryWSM) WSM.nFileType
[in]nOptions(OPTIONAL, default = to_ut(WSM.nLoadingOptions.RemoveDuplicate | WSM.nLoadingOptions.Merge | WSM.nLoadingOptions.CreateMesh)) int
[in]dMaxDistanceFromOrigin(OPTIONAL, default = 0.0) double
[in]dScaleFactor(OPTIONAL, default = 1.0) double
Returns
iOffset
json WSM.APILoadHistoryFromBinaryString ( nHistoryID  ,
base64Str  ,
base64encoded   
)

Load the whole history (with all undo states) from an, optionally base64 encoded, string and add to to an empty History.

Parameters: In: nHistoryID, base64Str Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]base64StrString
[in]base64encoded(OPTIONAL, default = true) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APILoadMaterialsFromAXMFile ( nHistoryID  ,
sFilePath   
)

Load only materials and their textures from an AXM file into the given history.

Materials and textures from all group histories in the file are copied into the single given history Parameters: In: nHistoryID, sFilePath Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]sFilePathString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APILoft ( nHistoryID  ,
aaProfileIDs  ,
bDeleteInteriorProfileFaces   
)

APILoft makes Faces that connect a vector of profiles.

Parameters: In: nHistoryID, aaProfileIDs, bDeleteInteriorProfileFaces Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]aaProfileIDsArray of std.vector
[in]bDeleteInteriorProfileFaces(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMergeBody ( nHistoryID  ,
nBodyID  ,
dSmoothCosAngle   
)

Merges all the merge-able Edges and Vertices out of a Body.

Parameters: In: nHistoryID, nBodyID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nBodyIDint
[in]dSmoothCosAngle(OPTIONAL, default = WSM_TIGHT_SMOOTH_COSINE_ANGLE) double
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMergeDeltas ( nHistoryID  ,
nStartDeltaID  ,
nEndDeltaID  ,
bReuseDiscardedObjectIDs   
)

APIMergeDeltas merges the specified Delta range.

Parameters: In: nHistoryID, nStartDeltaID, nEndDeltaID, bReuseDiscardedObjectIDs Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]nStartDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
[in]nEndDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
[in]bReuseDiscardedObjectIDs(OPTIONAL, default = true) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMeshComputeNonSmoothEdgesReadOnly ( nHistoryID  ,
nMeshID  ,
dCosSmoothAngle   
)

Returns non-smooth edges from the Mesh.

Note, the edges are only included once and are returned as subsequent pairs of indices into the m_aPoints vector. Parameters: In: nHistoryID, nMeshID, dCosSmoothAngle Out: Edge indices.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
[in]dCosSmoothAngle(OPTIONAL, default = 0.86602540378443864676372317075294) double
Returns
aEdges
json WSM.APIMeshComputeSilhouetteEdgesReadOnly ( nHistoryID  ,
nMeshID  ,
cameraPos  ,
cameraDir  ,
bPerspectiveView   
)

Returns silhouette edges from the Mesh.

Note, the edges are only included once and are returned as subsequent pairs of indices into the m_aPoints vector. Parameters: In: nHistoryID, nMeshID, cameraPos, cameraDir, bPerspectiveView Out: Silhouette indices.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
[in]cameraPosWSM.Point3d
[in]cameraDirWSM.Vector3d
[in]bPerspectiveViewbool
Returns
aSilhouettes
json WSM.APIMeshContainsPointReadOnly ( nHistoryID  ,
nMeshID  ,
point   
)

Returns true and the normal if the Mesh contains the point.

Parameters: In: nHistoryID, nMeshID, point Out: Boolean and normal.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
[in]pointWSM.Point3d
Returns
{ { "bContainsPoint" , to_json(bContainsPoint) }, { "normal" , to_json(normal) }, { "triangle" , to_json(aTrianglePts) } };
json WSM.APIMeshPointOnOrInsideIfManifoldReadOnly ( nHistoryID  ,
nMeshID  ,
point   
)

Return true if the given point is on the Mesh.

When the point is not on the Mesh, but the Mesh is manifold, checks if the point is inside the Mesh. Parameters: In: nHistoryID, nMeshID, point Out: Boolean.

Parameters
[in]nHistoryIDint
[in]nMeshIDint
[in]pointWSM.Point3d
Returns
bPointOnOrInside
json WSM.APIMoveImage ( nHistoryID  ,
nImageID  ,
nShift   
)

APIMoveImage moves the image along z axis.

Images positions >= 0 Parameters: In: nHistoryID, nImageID, nShift Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nImageIDint
[in]nShiftint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMoveObject ( nHistoryID  ,
objectID  ,
displacement   
)

APIMoveObject moves the given object with displacement.

Parameters: In: nHistoryID, objectID, displacement Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]objectIDint
[in]displacementWSM.Vector3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMoveObjects ( nHistoryID  ,
objectIDs  ,
transf3d   
)

APIMoveObjects moves the given objects with t.

Parameters: In: nHistoryID, objectIDs, transf3d Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]objectIDsWSM.Utils.HistoryObjects
[in]transf3dWSM.Transf3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIMoveVertices ( nHistoryID  ,
aVertexIDs  ,
aNewVertexPositions   
)

APIMoveVertices moves the vertices specified in aVertexIDs to the given positions in aNewVertexPositions.

Parameters: In: nHistoryID, aVertexIDs, aNewVertexPositions Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]aVertexIDsWSM.Utils.HistoryObjects
[in]aNewVertexPositionsArray of WSM.Point3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIOffset3d ( nHistoryID  ,
nObjectID  ,
dDistance   
)

APIOffset3d offsets all the Faces in the given Object by the amount specified.

Parameters: In: nHistoryID, nObjectID, dDistance Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]dDistancedouble
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIOffsetEdges ( nHistoryID  ,
nEdgeIDs  ,
dOffsetDistance  ,
trans  ,
bReadOnly   
)

APIOffsetEdges offsets Edges by given distance.

Parameters: In: nHistoryID, nEdgeIDs, dOffsetDistance, trans = WSM.Transf3d.kIdentity, bReadOnly = false Out: bReadOnly == false ? JSON_UNDEFINED : offset Pts in boundary;

Parameters
[in]nHistoryIDint
[in]nEdgeIDsWSM.Utils.HistoryObjects
[in]dOffsetDistancedouble
[in]trans(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
[in]bReadOnly(OPTIONAL, default = false) bool
Returns
bReadOnly ? to_json(aOffsetPoints) : JSON_UNDEFINED;
json WSM.APIOffsetFace ( nHistoryID  ,
nFaceID  ,
dOffsetDistance  ,
bOffsetHolesToo  ,
trans  ,
bReadOnly   
)

APIOffsetFace offsets a copy of the boundary a face by given distance.

Parameters: In: nHistoryID, nFaceID, dOffsetDistance, bOffsetHolesToo = false, trans = WSM.Transf3d.kIdentity, bReadOnly = false Out: bReadOnly == false ? JSON_UNDEFINED : offset Pts in boundary;

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]dOffsetDistancedouble
[in]bOffsetHolesToo(OPTIONAL, default = false) bool
[in]trans(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
[in]bReadOnly(OPTIONAL, default = false) bool
Returns
bReadOnly ? to_json(aOffsetPoints) : JSON_UNDEFINED;
json WSM.APIPointMeshContainsPointReadOnly ( nHistoryID  ,
nPointMeshID  ,
point   
)

Returns true if the PointMesh contains the point.

Parameters: In: nHistoryID, nPointMeshID, point Out: Boolean.

Parameters
[in]nHistoryIDint
[in]nPointMeshIDint
[in]pointWSM.Point3d
Returns
bContainsPoint
json WSM.APIPointMeshGetPointsOnNegativeSideOfPlanesReadOnly ( nHistoryID  ,
nPointMeshID  ,
aPlanes  ,
dTol   
)

Get all points of the PointMesh that lie on the negative side of all the given Planes.

In: nHistoryID, nPointMeshID, aPlanes, dTol Out: points.

Parameters
[in]nHistoryIDint
[in]nPointMeshIDint
[in]aPlanesArray of WSM.Plane
[in]dTol(OPTIONAL, default = WSM_MACHINE_TOL) double
Returns
aPoints
json WSM.APIPushMirrorTransformationsOntoGeometry ( nHistoryID  )

Pushes mirror Instance transformations onto the underlying geometry sharing referenced Histories as much as possible.

Calls APIPushBadTransformationsOntoGeometry. Not an exact match to avoid passing functions through javascript. In: nHistoryID Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRayFireReadOnly ( nHistoryID  ,
line3dPickRay  ,
dRayRadius  ,
bVertices  ,
bEdges  ,
bFaces   
)

APIRayFireReadOnly calls WSM.APIRayFireReadOnly.

See WSMApi.h for comments. Parameters: In: nHistoryID, line3dPickRay, dRayRadius, bVertices, bEdges, bFaces Out: Array of IDs intersected by the ray.

Parameters
[in]nHistoryIDint
[in]line3dPickRayWSM.Line3d
[in]dRayRadiusdouble
[in]bVerticesbool
[in]bEdgesbool
[in]bFacesbool
Returns
aHits
json WSM.APIRayFireSortedReadOnly ( nHistoryID  ,
line3dPickRay  ,
dRayRadius  ,
bVertices  ,
bEdges  ,
bFaces  ,
dMaxParam  ,
bSearchInGroups  ,
aIgnoreObjects   
)

APIRayFireSortedReadOnly calls WSM.APIRayFireReadOnly.

See WSMApi.h for comments. This version uses the pParamIndexVec param in WSM to get a sorted list. When aIgnoreObjects is not empty, only those objects are returned that are not part of aIgnoreObjects. Note that aIgnoreObjects should only contain top level objects or instances (if not they will be converted to top levels) Parameters: In: nHistoryID, line3dPickRay, dRayRadius, bVertices, bEdges, bFaces, dMaxParam, bSearchInGroups, aIgnoreObjects Out: Array of IDs intersected by the ray.

Parameters
[in]nHistoryIDint
[in]line3dPickRayWSM.Line3d
[in]dRayRadiusdouble
[in]bVerticesbool
[in]bEdgesbool
[in]bFacesbool
[in]dMaxParam(OPTIONAL, default = WSM_DISTANCE_BIG) double
[in]bSearchInGroups(OPTIONAL, default = false) bool
[in]aIgnoreObjects(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
{ { "directHits" , to_json(aHits)}, { "objectsInGroupsVec" , to_json(objectsInGroupsVec)}, { "groupAggregateTransf3dVec" , to_json(groupAggregateTransf3dVec)}, { "sortedIndices" , to_json(sortedIndices)}, { "sortedParameters" , to_json(sortedParameters)} };
json WSM.APIRedoHistory ( nHistoryID  ,
nApplyOnDeltaID   
)

APIRedoHistory redoes History.

Parameters: In: nHistoryID, nApplyOnDeltaID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nApplyOnDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRedoHistoryToDelta ( nHistoryID  ,
nDeltaID   
)

APIRedoHistoryToDelta redoes History.

Parameters: In: nHistoryID, nDeltaID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nDeltaIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRegisterProgressCallbacksReadOnly ( startCbkStr  ,
progressCbkStr  ,
finishCbkStr  ,
progressIncrement  ,
progressStart  ,
progressEnd   
)

Register API progress callback.

The first 3 parameters are names of the callback functions (passed as strings), which have to be global functions, i.e. defined outside of runtest(). All parameters are optional. Calling this API without arguments (or with the first argument being an empty string) resets the callbacks.

Parameters
[in]startCbkStr(OPTIONAL, default = "" s) String
[in]progressCbkStr(OPTIONAL, default = "" s) String
[in]finishCbkStr(OPTIONAL, default = "" s) String
[in]progressIncrement(OPTIONAL, default = 1.0f) float
[in]progressStart(OPTIONAL, default = 0.0f) float
[in]progressEnd(OPTIONAL, default = 100.0f) float
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRemoveObjectsLayers ( nHistoryID  ,
aLayerIDs  ,
aObjectIDs   
)

Remove layers from objects.

Parameters
[in]nHistoryIDint
[in]aLayerIDsWSM.Utils.HistoryObjects
[in]aObjectIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRemoveSatelliteData ( nHistoryID  ,
nImageID   
)

APIRemoveSatelliteData removes satellite data from image object Parameters: In: nHistoryID, nImageID Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nImageIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIReverseFaces ( nHistoryID  ,
aFaceIDs   
)

APIReverseFaces Parameters: In: nHistoryID, aFaceIDs Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]aFaceIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRotateFace ( nHistoryID  ,
nFaceID  ,
aRadian   
)

APIRotateFace rotates face by given radian using default rotation axis.

Parameters: In: nHistoryID, nFaceID, aRadian Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]aRadiandouble
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIRotateFaceBetweenPoints ( nHistoryID  ,
nFaceID  ,
startPt  ,
endPt   
)

Rotates a Face between two given points Both points are projected into the face plane The angle of rotation is a radian from 0 to 2PI, determined by the angle counterclockwise from Vector(startPt-faceCenter) to Vector(endPt-faceCenter), with normal as the face's normal Parameters: In: nHistoryID, nFaceID, startPt, endPt Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]startPtWSM.Point3d
[in]endPtWSM.Point3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveAllActiveObjectsToBinaryFileReadOnly ( nHistoryID  ,
sFilePath   
)

Save all active Objects to a binary file.

Parameters: In: nHistoryID, sFilePath Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]sFilePathString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveDeltaToBinaryStringReadOnly ( nHistoryID  ,
nDeltaID   
)

APISaveDeltaToBinaryStringReadOnly Parameters: In: nHistoryID, [nDeltaID] Out: base64Str, deltaID.

Parameters
[in]nHistoryIDint
[in]nDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
{ { "base64Str" , to_json(base64Str)}, { "deltaID" , to_json(nDeltaID)} };
json WSM.APISaveDeltaToSolidDefReadOnly ( nHistoryID  ,
bForUndo   
)

Gets the changed, created, and deleted objects in the most recent delta and encodes this information in a solid-def JSON string so that solid-def stored in HFDM can be kept up to date.

If bForUndo is true, get the changes caused by the most recent undo, meaning that objects created in the forward action are deleted by the undo, and vice versa. If no deltas are available past the current one and bForUndo is true, the API returns the WSM.nBadInput error result.

Parameters
[in]nHistoryIDID of the given History
[in]bForUndoOut: Changed and deleted guids for topology and geometry, json for created and changed
[in]nHistoryIDint
[in]bForUndo(OPTIONAL, default = false) bool
Returns
{ { "Topology" , to_json(aChangedDeletedTop) }, { "Geometry" , to_json(aChangedDeletedGeom) }, { "CreateChange" , to_json(jsonStr) } };
json WSM.APISaveHistoryToBinaryFileReadOnly ( nHistoryID  ,
sFilePath  ,
aLayerDisplayedNegateVec   
)

Save the whole history (with all undo states) to a binary file.

If aLayerDisplayedNegateVec is given, the displayed flag on Layers in the vector will be negated in the save file without creating a Delta. Parameters: In: nHistoryID, sFilePath, [aLayerDisplayedNegateVec] Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]sFilePathString
[in]aLayerDisplayedNegateVec(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveHistoryToBinaryStringReadOnly ( nHistoryID  ,
bBase64Encode  ,
aLayerDisplayedNegateVec   
)

Save the whole history (with all undo states) to a binary string.

If the bBase64Encode parameter is true, the data is base 64 encoded, to make it readable. Otherwise, it's just arbitrary bytes. The OUT parameter, lastDeltaID, returns the ID of the last closed Delta. If aLayerDisplayedNegateVec is given, the displayed flag on Layers in the vector will be negated in the save file without creating a Delta. Parameters: In: nHistoryID, bBase64Encode, [aLayerDisplayedNegateVec] Out: sOutputString, lastDeltaID

Parameters
[in]nHistoryIDint
[in]bBase64Encodebool
[in]aLayerDisplayedNegateVec(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
{ { "output" , to_json(sOutputString)}, { "lastDeltaIDAssign" , to_json(lastDeltaID)} };
json WSM.APISaveLastDeltaToBinaryFile ( nHistoryID  ,
sFilePath   
)

Save last Delta and all changed Objects to a binary file.

Parameters: In: nHistoryID, sFilePath Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]sFilePathString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveToAXMFileReadOnly ( nHistoryID  ,
aObjectIDs  ,
sFilePath  ,
aPreviewImage  ,
bWithChildren   
)

Saves Objects to an AXM file.

If bWithChildren is true, all children of the given Objects are saved too. The AXM save version is fixed at version 30. Note the file only includes WSM data and the preview block. No other information is included in the file (e.g. no camera data, no material manager data, no shadow settings, etc). If a more complete AXM file is desired, save from FormIt.

Parameters
[in]nHistoryIDID of the History to save.
[in]aObjectIDsThe given list of Object IDs
[in]sFilePathThe AXM file to save to.
[in]aPreviewImageThe preview image for the file. Can be empty if there is no thumbnail otherwise should be a PNG.
[in]bWithChildrenTrue if children of Objects are also saved. Out: JSON_UNDEFINED;
[in]nHistoryIDint
[in]aObjectIDsArray of int
[in]sFilePathString
[in]aPreviewImage(OPTIONAL, default = {}) Array of char
[in]bWithChildren(OPTIONAL, default = true) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveToFileReadOnly ( nHistoryID  ,
aObjectIDs  ,
sFilePath  ,
eFileType  ,
bWithChildren  ,
dExportScale  ,
aExcludedObjects  ,
aLayerDisplayedNegateVec   
)

Save Objects to a file of the specified type.

If bWithChildren is true, save all children of the given Objects too. dExportScale sets the scaling transform for unit-less output formats (currently, STL and OBJ). The aExcludedObjecs vector contains objects that need to be excluded from the export. These may be instances or top level objects in referenced groups. The various exporters will check aExcludedObjects when looping through the children of the objects supplied in aObjectIDs. If aLayerDisplayedNegateVec is given, the displayed flag on Layers in the vector will be negated in the save file without creating a Delta.

Parameters
[in]nHistoryIDID of the given History
[in]aObjectIDsThe given list of Object IDs
[in]sFilePath
[in]eFileType
[in]bWithChildren
[in]dExportScale
[in]aExcludedObjects
[in]aLayerDisplayedNegateVecOut: JSON_UNDEFINED;
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]sFilePathString
[in]eFileType(OPTIONAL, default = WSM.nFileTypeBinaryWSM) WSM.nFileType
[in]bWithChildren(OPTIONAL, default = true) bool
[in]dExportScale(OPTIONAL, default = 1.0) double
[in]aExcludedObjects(OPTIONAL) Array of WSM.ObjectHistoryID
[in]aLayerDisplayedNegateVec(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISaveToStringReadOnly ( nHistoryID  ,
aObjectIDs  ,
bWithChildren  ,
aExcludedObjects  ,
aLayerDisplayedNegateVec  ,
eFileType   
)

Save Objects to a string.

The string loses its contents, gets reset to the exact size of the output data, and gets populated by this data. If bWithChildren is true, all children of the given Objects are saved too. The aExcludedObjects vector contains objects that need to be excluded from the export. These may be instances or top level objects in referenced groups. The various exporters will check aExcludedObjects when looping through the children of the objects supplied in aObjectIDs. If the bBase64Encode parameter is true, the data is base 64 encoded, to make it readable. Otherwise, it's just arbitrary bytes. If aLayerDisplayedNegateVec is given, the displayed flag on Layers in the vector will be negated in the save string without creating a Delta.

Parameters
[in]nHistoryIDID of the given History
[in]aObjectIDsThe given list of Object IDs
[in]eFileType
[in]bWithChildren
[in]aExcludedObjects
[in]bBase64Encode
[in]aLayerDisplayedNegateVecParameters: In: nHistoryID, vector of Objects, save With Children flag, [aExcludedObjects], [aLayerDisplayedNegateVec], [eFileType] Out: The save string
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]bWithChildren(OPTIONAL, default = true) bool
[in]aExcludedObjects(OPTIONAL) Array of WSM.ObjectHistoryID
[in]aLayerDisplayedNegateVec(OPTIONAL) Array of WSM.ObjectHistoryID
[in]eFileType(OPTIONAL, default = WSM.nFileTypeBinaryWSM) WSM.nFileType
Returns
saveString
json WSM.APIScaleFace ( nHistoryID  ,
nFaceID  ,
aScaleFactor   
)

Scales a Face by given scale factor, around its centroid.

Parameters: In: nHistoryID, nFaceID, aScaleFactor Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]aScaleFactordouble
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISeparate ( nHistoryID  ,
nBodyID   
)

APISeparate Parameters: In: nHistoryID, nBodyID Out: A vector of new Body IDs.

Parameters
[in]nHistoryIDint
[in]nBodyIDint
Returns
aNewBodyIDs
json WSM.APISetDynamoModelInformation ( nHistoryID  ,
id  ,
name  ,
config  ,
delta   
)

APISetDynamoModelInformation sets Dynamo Model information of the history.

Parameters: In: nHistoryID, id, name, config, delta

Parameters
[in]nHistoryIDint
[in]id(OPTIONAL) String
[in]name(OPTIONAL) String
[in]config(OPTIONAL) String
[in]delta(OPTIONAL) String
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetEdgesOrVerticesMarkedSmooth ( nHistoryID  ,
aObjectIDs  ,
bSmooth   
)

SetEdgesOrVerticesMarkedSmooth Marks all of aObjectIDs' smoothness.

If bSmooth, all are marked as smooth If not bSmooth, all are marked as non-smooth Parameters: In: HistoryID, ObjectIDs bool (smooth setting)

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]bSmoothbool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetEdgesStyle ( nHistoryID  ,
aEdgeIDs  ,
nColor   
)

Set the style of edges on given objects.

Parameters
[in]nHistoryIDint
[in]aEdgeIDsWSM.Utils.HistoryObjects
[in]nColorWSM.Color
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetFaceBacksideMaterial ( nHistoryID  ,
aFaceIDs  ,
nMaterialID   
)

Sets the material given by MaterialID as the backside material of the given faces.

Parameters
[in]nHistoryIDint
[in]aFaceIDsWSM.Utils.HistoryObjects
[in]nMaterialIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetFaceUVDataAttributes ( nHistoryID  ,
aFaceIDs  ,
rTransf3d  ,
bReplaceTransform  ,
tformCenter  ,
tformUVCenter   
)

Sets FaceUVDataAttributes on the faces passed in and applies a transform to them.

(Note: The 3d transform should only contain 2d (x,y) transformations.) Note if bReaPlaceTransform is true, use the transform directly - this is used with the transform returned from APIGetFaceUVDataTransformReadOnly.

Parameters
[in]nHistoryIDint
[in]aFaceIDsWSM.Utils.HistoryObjects
[in]rTransf3d(OPTIONAL, default = WSM.Transf3d.kIdentity) WSM.Transf3d
[in]bReplaceTransform(OPTIONAL, default = false) bool
[in]tformCenter(OPTIONAL) Array of WSM.Point3d
[in]tformUVCenter(OPTIONAL) Array of WSM.Point2d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetImageData ( nHistoryID  ,
nImageID  ,
sName  ,
nTextureID  ,
fAlphaValue  ,
bFeaturesVisible  ,
aCornersVector   
)

APISetImageData sets data to image object Parameters: In: nHistoryID, nImageID, sName, nTextureID, fAlphaValue, aCorners Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nImageIDint
[in]sNameString
[in]nTextureIDint
[in]fAlphaValuedouble
[in]bFeaturesVisiblebool
[in]aCornersVectorArray of WSM.Point3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetLayerData ( nHistoryID  ,
nLayerID  ,
name  ,
bDisplayed   
)

Set the data of a layer.

Parameters
[in]nHistoryIDint
[in]nLayerIDint
[in]nameString
[in]bDisplayedbool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetLayersDisplayed ( nHistoryID  ,
aLayerIDs  ,
bDisplayed   
)

Set the display flag of layers without affecting the other data.

Parameters
[in]nHistoryIDint
[in]aLayerIDsWSM.Utils.HistoryObjects
[in]bDisplayedbool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetLevelsData ( nHistoryID  ,
aLevelIDs  ,
aLevelsData   
)

APISetLevelsData sets the elevation and name properties on Level.

Parameters: In: nHistoryID, aLevelIDs, aLevelsData Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]aLevelIDsWSM.Utils.HistoryObjects
[in]aLevelsDataLevelDataType
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetLocalCoordinateSystem ( nHistoryID  ,
transf3d   
)

Set the LCS (local coordinate system) of the given History.

Parameters: In: nHistoryID, transf3d Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]transf3dWSM.Transf3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetMaterialColor ( nHistoryID  ,
nMaterialID  ,
nColor   
)

APISetMaterialColor sets the color on a Material.

Parameters: In: nHistoryID, nMaterialID, nColor Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nMaterialIDint
[in]nColorWSM.Color
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetMaterialData ( nHistoryID  ,
nMaterialID  ,
nColor  ,
dHorizontalScale  ,
dVerticalScale  ,
nTextureID  ,
sMaterialName  ,
sMaterialIdentifier  ,
aAdditionalRenderData  ,
aAdditionalTextures   
)

APISetMaterialData sets all the data of a Material.

Parameters: In: nHistoryID, nMaterialID, nColor, dHorizontalScale, dVerticalScale, nTextureID, sMaterialName, sMaterialIdentifier, aAdditionalRenderData, aAdditionalTextures Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nMaterialIDint
[in]nColorWSM.Color
[in]dHorizontalScaledouble
[in]dVerticalScaledouble
[in]nTextureIDint
[in]sMaterialName(OPTIONAL) String
[in]sMaterialIdentifier(OPTIONAL) String
[in]aAdditionalRenderData(OPTIONAL) vectorpairstring
[in]aAdditionalTextures(OPTIONAL) vectorpairstringsize
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetMaterialTexture ( nHistoryID  ,
nMaterialID  ,
dHorizontalScale  ,
dVerticalScale  ,
nTextureID   
)

APISetMaterialTexture sets the texture properties on a Material.

Parameters: In: nHistoryID, nMaterialID, dHorizontalScale, dVerticalScale, nTextureID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nMaterialIDint
[in]dHorizontalScaledouble
[in]dVerticalScaledouble
[in]nTextureIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetObjectProperties ( nHistoryID  ,
nObjectID  ,
sObjectName  ,
bReportAreaByLevel  ,
aDefaultLevelIDs   
)

Sets the properties of a given object (Body): A name and if that particular body reports its area by level or not.

Parameters: In: nHistoryID, nObjectID, sObjectName, bReportAreaByLevel, aDefaultLevelIDs Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]sObjectNameString
[in]bReportAreaByLevelbool
[in]aDefaultLevelIDs(OPTIONAL) Array of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetObjectsLevels ( nHistoryID  ,
aObjectIDs  ,
aLevelsIDs   
)

APISetObjectsLevels sets the Levels pointed by aLevelsIDs to objects pointed by aObjectIDs.

Parameters: In: nHistoryID, aObjectIDs, aLevelsIDs Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]aLevelsIDsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetObjectsMaterial ( nHistoryID  ,
aObjectIDs  ,
nMaterialID   
)

APISetObjectsMaterial sets a material for the given object.

Parameters: In: nHistoryID, aObjectIDs, nMaterialID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]nMaterialIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetRevitFamilyInformation ( nHistoryID  ,
bIsGeneratedFromRFA  ,
bIsGeneratedFromBuiltinRFA  ,
familyCategory  ,
familyReference  ,
familyType  ,
familyExtraData   
)

APISetRevitFamilyInformation sets Revit Family information of the history.

Parameters: In: nHistoryID, bIsGeneratedFromRFA, bIsGeneratedFromBuiltinRFA, familyCategory, familyReference, familyType, familyExtraData

Parameters
[in]nHistoryIDint
[in]bIsGeneratedFromRFAbool
[in]bIsGeneratedFromBuiltinRFAbool
[in]familyCategoryString
[in]familyReferenceString
[in]familyTypeString
[in]familyExtraDataString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetSatelliteData ( nHistoryID  ,
nImageID  ,
coordinates  ,
coordinatesSpan  ,
aPixelDimensions   
)

APISetSatelliteData sets satellite data to image object Parameters: In: nHistoryID, nImageID, coordinates, coordinatesSpan, aPixelDim Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nImageIDint
[in]coordinatesWSM.Vector2d
[in]coordinatesSpanWSM.Vector2d
[in]aPixelDimensionsArray of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetStringAttributeValue ( nHistoryID  ,
nStringAttributeID  ,
sValue   
)

Sets the value strings for a StringAttribute In: nHistoryID, nStringAttributeID, sValue.

Parameters
[in]nHistoryIDint
[in]nStringAttributeIDint
[in]sValueString
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISetTextureData ( nHistoryID  ,
nTextureID  ,
aBitmapData  ,
bUseBitmapAlpha  ,
sTextureName   
)

APISetTexture data sets the bitmap data on a texture Parameters: In: nHistoryID, nTextureID, sBitmapData, nBytes Out: JSON_UNDEFINED;.

Parameters
[in]nHistoryIDint
[in]nTextureIDint
[in]aBitmapDataArray of char
[in]bUseBitmapAlpha(OPTIONAL, default = true) bool
[in]sTextureName(OPTIONAL) String
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIShell ( nHistoryID  ,
nBodyID  ,
dDistance  ,
aOpenFaceIDs   
)

APIShell shells the given Body by the specified distance.

Faces in aOpenFaceIDs are not offset creating openings into the final Body. Parameters: In: nHistoryID, nBodyID, dDistance, aOpenFaceIDs - optional vector of FaceID that are left open Out: JSON_UNDEFINED

Parameters
[in]nHistoryIDint
[in]nBodyIDint
[in]dDistancedouble
[in]aOpenFaceIDs(OPTIONAL) Array of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISlice ( nHistoryID  ,
nDestinationHistoryID  ,
nObjectID  ,
plane  ,
aIgnoreObjects   
)

APISlice When aIgnoreObjects is not empty, only objects that are not part of aIgnoreObjects are sliced.

Note that aIgnoreObjects should only contain top level objects or instances (if not they will be converted to top levels) Parameters: In: nHistoryID, nDestinationHistoryID, nObjectID, plane, aIgnoreObjects Out: Vector of new top levels

Parameters
[in]nHistoryIDint
[in]nDestinationHistoryIDint
[in]nObjectIDint
[in]planeWSM.Plane
[in]aIgnoreObjects(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
aNewNonOwnedIDs
json WSM.APISliceHistoryReadOnly ( nHistoryID  ,
plane  ,
aIgnoreObjects   
)

APISliceHistoryReadOnly Slices the history with the Plane creating line points.

When aIgnoreObjects is not empty, only objects that are not part of aIgnoreObjects are sliced. Note that aIgnoreObjects should only contain top level objects or instances (if not they will be converted to top levels) Parameters: In: nHistoryID, plane, aIgnoreObjects Out: Vector point/smooth pairs. A segment is composed of point[2*i] and point[2*i+1] for each segment.

Parameters
[in]nHistoryIDint
[in]planeWSM.Plane
[in]aIgnoreObjects(OPTIONAL) Array of WSM.ObjectHistoryID
Returns
aPointsToConnect
json WSM.APISplitAtNonManifoldEdgesAndVertices ( nHistoryID  )

Changes the model so that every edge on more than two faces and every vertex with more than one edge group is copied so that these conditions no longer occur.

Referenced Histories from Groups are always included in the correction so Deltas in multiple Histories may result from this API. If paChangedHistories is given, all Histories that have been changed will be returned. This API is used for Revit translation. Note non-owned faces with their connected component of faces are put into bodies as a side effect of this operation because overlapping non-owned faces are not expected. In: nHistoryID Out: Vector of changed History IDs

Parameters
[in]nHistoryIDint
Returns
aChangedHistories
json WSM.APISubtract ( nHistoryID  ,
nObjectID1  ,
nObjectID2  ,
aExtraObjectsIDs   
)

APISubtract Parameters: In: nHistoryID, nObjectID1, nObjectID2 Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nObjectID1int
[in]nObjectID2int
[in]aExtraObjectsIDs(OPTIONAL) Array of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISubtractNonDestructive ( blank  ,
tools   
)

APISubtractNonDestructive Parameters: In: blank, tools Out: JSON_UNDEFINED.

Parameters
[in]blankWSM.Utils.HistoryObjects
[in]toolsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APISweep ( nHistoryID  ,
aProfile  ,
aPath  ,
bRemoveUnusedProfileAndPath   
)

APISweep creates a sweep from profile and path from Objects in GroupInstancePaths in nHistoryID.

Parameters: In: nHistoryID, aProfile, aPath, bRemoveUnusedProfileAndPath Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]aProfileWSM.Utils.HistoryObjects
[in]aPathWSM.Utils.HistoryObjects
[in]bRemoveUnusedProfileAndPath(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APITaperFace ( nHistoryID  ,
nFaceID  ,
dRadians  ,
axis   
)

Taper a Face by angle around the given axis The angle of rotation is a radian from -PI/2 to PI/2 The angle of rotation is relative to the direction of the axis and the normal of the face.

If the axis vector is along the positive direction of a coedge then the positive angle will be outward and negative angle will produce an inward taper. Parameters: In: nHistoryID, nFaceID, dRadians, axis Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nFaceIDint
[in]dRadiansdouble
[in]axisWSM.Line3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APITransformObject ( nHistoryID  ,
nObjectID  ,
transf3d   
)

APITransformObject transforms nObjectID by the given transform (transf3d).

Parameters: In: nHistoryID, nObjectID, transf3d

Parameters
[in]nHistoryIDint
[in]nObjectIDint
[in]transf3dWSM.Transf3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APITransformObjects ( nHistoryID  ,
aObjectIDs  ,
transf3d   
)

APITransformObjects transforms aObjectIDs by the given transform (transf3d).

Parameters: In: nHistoryID, aObjectIDs, transf3d

Parameters
[in]nHistoryIDint
[in]aObjectIDsWSM.Utils.HistoryObjects
[in]transf3dWSM.Transf3d
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIUndoHistory ( nHistoryID  ,
bAndDeleteRedo  ,
nApplyOnDeltaID   
)

APIUndoHistory undoes History.

Parameters: In: nHistoryID, bAndDeleteRedo Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]bAndDeleteRedo(OPTIONAL, default = false) bool
[in]nApplyOnDeltaID(OPTIONAL, default = WSM.INVALID_ID) int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIUndoHistoryToDelta ( nHistoryID  ,
nDeltaID   
)

APIUndoHistoryToDelta undoes History.

Parameters: In: nHistoryID, nDeltaID Out: JSON_UNDEFINED;

Parameters
[in]nHistoryIDint
[in]nDeltaIDint
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIUndoOrRedoHistoryToDelta ( nHistoryID  ,
nDeltaID  ,
bAndDeleteRedo   
)

Step backward or forward until the given Delta is reached.

Parameters: In: nHistoryID, nDeltaID, bAndDeleteRedo

Parameters
[in]nHistoryIDint
[in]nDeltaIDint
[in]bAndDeleteRedo(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIUnite ( nHistoryID  ,
nObjectID1  ,
nObjectID2  ,
aExtraObjectsIDs   
)

APIUnite Parameters: In: nHistoryID, nObjectID1, nObjectID2 Out: JSON_UNDEFINED.

Parameters
[in]nHistoryIDint
[in]nObjectID1int
[in]nObjectID2int
[in]aExtraObjectsIDs(OPTIONAL) Array of int
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIUniteNonDestructive ( blank  ,
tools   
)

APIUniteNonDestructive Parameters: In: blank, tools Out: JSON_UNDEFINED.

Parameters
[in]blankWSM.Utils.HistoryObjects
[in]toolsWSM.Utils.HistoryObjects
Returns
JSON_UNDEFINED, i.e. {}
json WSM.APIValidID ( nID  )

APIValidID.

Parameters: In: Out: bool

Parameters
[in]nIDint
Returns
(nID != WSM.INVALID_ID) && (nID != WSM.INVALID_IDx32)
json WSM.Color ( ,
,
,
 
)

Color constructs a Color.

Parameter ranges from 0-255 (int). Parameters: In: red, green, blue, alpha Accepts values in the range 0.0-1.0 Out: Color

Parameters
[in]rint
[in]gint
[in]bint
[in]aint
Returns
{...}
json WSM.ColorAreEqual ( c1  ,
c2   
)

ColorAreEqual returns true if the two given colors are equal.

Parameters: In: Color, Color Out: bool

Parameters
[in]c1WSM.Color
[in]c2WSM.Color
Returns
c1 == c2
json WSM.FacetsBodyData ( m_points  ,
m_polygonIndices  ,
m_polygonSmoothingIds  ,
m_colors  ,
m_polygonColorIndices  ,
m_pointColors   
)

GroupInstancePath creation method In: m_points, m_polygonIndices, m_polygonSmoothingIds, m_colors, m_polygonColorIndices, m_pointColors Out: FacetsBodyData.

Parameters
[in]m_pointsArray of WSM.Point3d
[in]m_polygonIndicesArray of std.vector
[in]m_polygonSmoothingIdsArray of int
[in]m_colors(OPTIONAL) Array of WSM.Color
[in]m_polygonColorIndices(OPTIONAL) Array of int
[in]m_pointColors(OPTIONAL) Array of WSM.Color
Returns
{...}
json WSM.GroupInstancePath ( objectIDs  )

GroupInstancePath takes any form of Objects (GroupInstancePath, GroupInstancePathArray, ObjectHistoryIDArray, ObjectIDArray) and coverts to GroupInstancePath.

Parameters: In: ObjectIDs Out: GroupInstancePath

Parameters
[in]objectIDsWSM.Utils.HistoryObjects
Returns
path
json WSM.Is32Bit ( )

Is32Bit returns true if WSM is compiled in 32 bit.

Returns
{...}
json WSM.ObjectHistoryID ( nHistoryID  ,
nObjectID   
)
json WSM.ObjectHistoryIDAreEqual ( id1  ,
id2   
)

ObjectHistoryIDAreEqual equals method In: ObjectID, ObjectID Out: bool.

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