HandleOperator
-
class
Operators.HandleOperator() Handles are added scene elements that can update the position of your parts through user interaction. Find more information here.
Index
Constructors
Methods
addAxisRotationHandleaddAxisTranslationHandleaddHandlesaddMappingaddPlaneTranslationHandleaddTrackedPointaddViewPlaneTranslationHandleclearMappingclearTrackedPointsgenerateGroupIdgetNodeIdsgetPositiongetTrackedPointsgetTranslationisEnabledremoveHandlessetAxisMeshDatasetHandleSizesetMappingsetNodeIdssetPlaneMeshDatasetRotateMeshDatasetViewPlaneMeshDatashowHandlesupdatePosition
Constructors
-
Operators.HandleOperator.constructor() Parameters
viewer:
IWebViewerview:
IViewReturns:
HandleOperator
Methods
-
Operators.HandleOperator.addAxisRotationHandle() Adds a handle that rotates around an axis
Parameters
position:
Point3center of the handle.axis:
Point3axis to rotate aroundcolor:
Colorcolor of the handle geometrypositionNormal: (None |
Point3) = nulloptional vector to control the orientation of the handle geometry.groupId: (None | number) = null
optional parameter to associate this handle with a group of NodeIdsReturns: Promise
-
Operators.HandleOperator.addAxisTranslationHandle() Adds a handle that moves along an axis.
Parameters
position:
Point3center of the handle.axis:
Point3axis to move alongcolor:
Colorcolor of the handle geometrypositionNormal: (None |
Point3) = nulloptional vector to control the orientation of the handle geometry.groupId: (None | number) = null
optional parameter to associate this handle with a group of NodeIdsReturns: Promise
-
Operators.HandleOperator.addHandles() - addHandles(nodeIds: number[], position: (None |
Point3)?, groupId: (None | number)?): PromiseAdds all handles into the scene, oriented along the primary axes
Parameters
nodeIds: number[]
corresponding to the parts that will move with the handlesposition: (None |
Point3) = nullworld space coordinates the the handle positiongroupId: (None | number) = null
Returns: Promise
-
Operators.HandleOperator.addMapping() inherited
addMapping(button:Button, modifier:KeyModifiers?): voidAdds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.
Parameters
button:
Buttonmodifier:
KeyModifiers= KeyModifiers.NoneReturns: void
-
Operators.HandleOperator.addPlaneTranslationHandle() Adds a handle that restricts movement to a plane.
Parameters
position:
Point3center of the handle.normal:
Point3normal of the planefaceColor:
Colorface color of the handle geometrylineColor:
Coloroutline color of the handle geometrypositionNormal: (None |
Point3) = nulloptional vector to control the orientation of the handle geometry.groupId: (None | number) = null
optional parameter to associate this handle with a group of NodeIdsReturns: Promise
-
Operators.HandleOperator.addTrackedPoint() - addTrackedPoint(point:
Point3): numberAdd a point to the tracked points list. When the handle moves, these points will update in world space.
Parameters
point:Point3Returns: number
point index
-
Operators.HandleOperator.addViewPlaneTranslationHandle() -
Adds a handle that restricts movement to the viewplane.
Parameters
Returns: Promise
-
Operators.HandleOperator.clearMapping() inherited
clearMapping(): voidClears any button and key modifier mappings for the operator.
Returns: void
-
Operators.HandleOperator.clearTrackedPoints() - clearTrackedPoints(): void
Clear the list of tracked points.
Returns: void
-
Operators.HandleOperator.generateGroupId() - generateGroupId(): number
This will generate a unique id to associate a group of handles with a group of NodeIds.
Returns: number
-
Operators.HandleOperator.getNodeIds() - getNodeIds(groupId: (None | number)?): number[]
Gets the NodeIds that the handles in the scene will move.
Parameters
groupId: (None | number) = null
optional parameter that specifies if the NodeIds to retrieve are part of a group.Returns: number[]
-
Operators.HandleOperator.getPosition() - getPosition(): (None |
Point3)Returns: (None |
Point3)the current handle position or null if not currently active.
-
Operators.HandleOperator.getTrackedPoints() - getTrackedPoints():
Point3[]Gets the tracked point list.
Returns:
Point3[]
-
Operators.HandleOperator.getTranslation() - getTranslation():
Point3Returns:
Point3the total translation applied to the handles.
-
Operators.HandleOperator.isEnabled() - isEnabled(): boolean
Returns a boolean value indicating if handles are available to be added to the scene If there is an active explode, active measure, or the model is a 2d drawing. this will be false.
Returns: boolean
-
Operators.HandleOperator.removeHandles() - removeHandles(): Promise
Removes all handles from the scene.
Returns: Promise
-
Operators.HandleOperator.setAxisMeshData() - setAxisMeshData(meshData:
MeshData): PromiseSets the mesh data for axis handles.
Parameters
meshData:MeshDataReturns: Promise
-
Operators.HandleOperator.setHandleSize() - setHandleSize(size: number): void
Takes a scale value to change the handle size with 1 representing the default size
Parameters
size: numberReturns: void
-
Operators.HandleOperator.setMapping() inherited
setMapping(button:Button, modifier:KeyModifiers?): voidSets the button and key modifier mapping for the operator.
Parameters
button:
Buttonmodifier:
KeyModifiers= KeyModifiers.NoneReturns: void
-
Operators.HandleOperator.setNodeIds() - setNodeIds(nodeIds: number[], groupId: (None | number)?): void
Sets the NodeIds that any handles in the scene will move.
Parameters
nodeIds: number[]
groupId: (None | number) = null
optional parameter that associates a group of NodeIds with a group of handles.Returns: void
-
Operators.HandleOperator.setPlaneMeshData() - setPlaneMeshData(meshData:
MeshData): PromiseSets the mesh data for plane handles.
Parameters
meshData:MeshDataReturns: Promise
-
Operators.HandleOperator.setRotateMeshData() - setRotateMeshData(meshData:
MeshData): PromiseSets the mesh data for rotation handles.
Parameters
meshData:MeshDataReturns: Promise
-
Operators.HandleOperator.setViewPlaneMeshData() - setViewPlaneMeshData(meshData:
MeshData): PromiseSets the mesh data for view plane handles.
Parameters
meshData:MeshDataReturns: Promise
-
Operators.HandleOperator.showHandles() - showHandles(): void
Shows any handles that have been added to the scene.
Returns: void
-
Operators.HandleOperator.updatePosition() Updates the current handle position.
Parameters
Returns: Promise