History
#
ApiHistoryHistory based modeling is similar to solid modeling, but it is non-destructive and parametric. You can move back and forth in the modeling history and create feature expressions which you can alter at a later time, prompting your model to re-calculate. Use this for assembly and variant configurators.
The history modeling approach relies heavily on the underlying
assemblyBuilder ClassCAD API
. Since this part of the API is still under construction, the interfaces of the history functions can still change.
#
addDimensionsAdds multiple dimensions to products in the 3D view
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
dimensions | DimensionType[] | Dimensions to be added to products |
Returns Promise<ObjectID[] | null>
Array containing the ids of added dimensions
Example
#
addInstancesAdds products as instances to root assembly, assembly instance or assembly template.
- If the owner is an instance in the expanded tree, its template in the assembly container will also be updated.
- If the onwer is an assembly template, all instances of the template will also be updated
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
instances | { productId: VID l ObjectIdent ownerId: VID l ObjectIdent transformation: Transform name?: string options?: { ident?: ObjectIdent } }[] | Array of objects containing the information of "to add" instances. See following parameter descriptions. |
Returns Promise<ObjectID[] | null>
Array containing the ids of added instances direct to owner
#
booleanCreates a boolean operation.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the operation will be created on | |
type | BooleanOperationType | Type of boolean operation. | |
operations | VID[] | Ids of the operations for this boolean operation, e.g. Box, Chamfer. At least two operations are needed. First operation in the array is the basic operation, all following are the tool operations, which will be unified, subtract or intersect with/from the first operation. |
Returns ID
Id of the boolean operation
Example
#
boxCreates a box operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the box will be created | |
references | VID[] | Reference of work coordinate system to place the box at | |
width | number l string | Width of the box (y-axis) | |
length | number l string | Length of the box (x-axis) | |
height | number l string | Height of the box (z-axis) |
Returns ID
Id of the box operation
Example
#
chamferCreates a chamfer operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the chamfers will be created | |
type | ChamferType | Type of chamfer operation. | |
references | VIDs | Edge references where the chmamfers will be created on | |
dist1 | number l string | 1st distance of the chamfer from the edge | |
dist2 | number l string | 2nd distance of the chamfer from the edge. Optional if type = Equal_Distance or Distance_And_Angle | |
angle | number l string | Angle of the chamfer. Optional if type = Equal_Distance or Two_Distances |
Returns ID
Id of the chamfer operation
Example
#
circularPatternCreates a circular pattern operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to create the circular pattern in. | |
operations | VID[] | Ids of the operations which are used for this circular pattern operation, e.g. box, extrusion, chamfer operation | |
references | VID[] | References for the rotation axis of the pattern. E.g. edge / work axis or 2 vertices / work points | |
params.inverted | 0 l 1 | ||
params.angle | number l string | ||
params.count | number l string | ||
params.merged | 0 l 1 |
Returns ID
Id of the circular pattern operation
#
coneCreates a cone operation.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the cone will be created | |
references | VID[] | Reference of work coordinate system to place the cone at | |
bDiameter | number l string | Bottom diameter of the cone | |
tDiameter | number l string | Top diameter of the cone | |
height | number l string | Height of the cone |
Returns ID
Id of the cone operation
Example
#
copySketchCopy an existing sketch and adds its elements to a new sketch. The id of this new created sketch will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part we want to create the new sketch and copy the sketch elements into it | |
sketchId | VID | Id of the sketch to copy | |
planeId | VID | Id of the face or workplane to set the new sketch on |
Returns ID
Id of the new sketch, containing the sketch elements form copied sketch
#
create2DViewsCreates different 2D views, depending on the given view types, in the given product.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product where the view will be created in | |
viewTypes | ViewType[] | Array of view types. E.g. [ViewType.TOP, ViewType.RIGHT_90, ViewType.ISO, ... | |
viewOptions? | ViewOptionsType | Optional object of options (currently color and layer) to set for the views. - color: number value 0 - 256, see AutoCAD Color Index (ACI). 256 = color defined by layer - layer: string value, defines the view's layer - Default = { color: 256, layer: '0'} |
Returns IDs
Array containing the ids of created views
Example
#
createAssemblyAsTemplateCreates a new assembly template. This template will be added to the assembly container and can be instantiated multiple times as a sub assembly in the root assembly or in other assembly template. Assembly templates can only be created if the root is already an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
name? | string | [optional] name of the assembly template. Default = 'Assembly' |
Returns ID
Id of the assembly template
Example
#
createBufferGeometryCreates the buffer geometry of any product (part or assembly).
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product to create buffer geometry from |
Returns Promise<BufferGeometry[] | undefined>
Array of buffer geometry
Example
#
createCircularPatternConstraintMakes copies of a selected instance and creates a circular pattern constraint between them.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
instanceId | VID | Id of the instance to be copied | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states; should belong to the selected instance | |
instanceCount | number l string | Total number of copies (clockwise around the axis set by z-axis of mate1) | |
angle | number l string | Angle between copies (clockwise around the axis set by z-axis of mate1) | |
offset | number l string | Offset between copies (set by z-axis of mate2) | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the circular pattern constraint
#
createCylindricalConstraintCreates a cylindrical constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
zOffsetLimits | LimitsParam | Min and max value of offset along z | |
zRotationLimits | LimitsParam | Min and max value of rotation around z | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the cylindrical constraint
#
createExpressionsCreates one or more expressions.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID l ObjectIdent | Id or identifier of the part to create the expressions in | |
members | { name: string; value: number l string }[] | Array of members which contain a name and a value. Value can be an expression, e.g. '2 * laenge' |
Returns Promise<boolean>
True or false, depending on whether creating the expressions was successful or not
Example
#
createFastenedConstraintCreates a fastened constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its 1st part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
xOffset | number l string | Defines a offset in x-axis from mate1 to mate2 | |
yOffset | number l string | Defines a offset in y-axis from mate1 to mate2 | |
zOffset | number l string | Defines a offset in z-axis from mate1 to mate2 | |
name | string | Name of the constraint | |
xRotation? | number l string | [optional] defines a rotation of mate2 around x-axis of mate1 | |
yRotation? | number l string | [optional] defines a rotation of mate2 around y-axis of mate1 | |
zRotation? | number l string | [optional] defines a rotation of mate2 around z-axis of mate1 |
Returns Promise<ObjectID | null>
Id of the fastened constraint
Example
#
createFastenedOriginConstraintCreates a fastened origin constraint for mate1 to the origin (0, 0, 0).
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
xOffset | number l string | Defines a offset in x-axis from mate1 to mate2 | |
yOffset | number l string | Defines a offset in y-axis from mate1 to mate2 | |
zOffset | number l string | Defines a offset in z-axis from mate1 to mate2 | |
name | string | Name of the constraint | |
xRotation? | number l string | [optional] defines a rotation of mate2 around x-axis of mate1 | |
yRotation? | number l string | [optional] defines a rotation of mate2 around y-axis of mate1 | |
zRotation? | number l string | [optional] defines a rotation of mate2 around z-axis of mate1 |
Returns Promise<ObjectID | null>
Id of the fastened origin constraint
Example
#
createGroupConstraintCreates a group constraint between selected instances within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
instanceIds | VID[] | Ids of instances to be grouped | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the group constraint
#
createLinearPatternConstraintMakes copies of a selected instance and creates a linear pattern constraint between them.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
instanceId | VID | Id of the instance to be copied | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states; should belong to the selected instance | |
firstDirInstanceCount | number l string | Number of copies over the first direction (set by z-axis of mate1) | |
firstDirDistance | number l string | Distance between copies over the first direction (set by z-axis of mate1) | |
name | string | Name of the constraint | |
mate2? | MateParam | [optional] contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states; should belong to the selected instance | |
secondDirInstanceCount? | number l string | [optional] number of copies over the second direction (set by z-axis of mate2) | |
secondDirDistance? | number l string | [optional] distance between copies over the second direction (set by z-axis of mate2) |
Returns Promise<ObjectID | null>
Id of the linear pattern constraint
#
createParallelConstraintCreates a parallel constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
xOffsetLimits | LimitsParam | Min and max value of offset along x | |
yOffsetLimits | LimitsParam | Min and max value of offset along y | |
zOffsetLimits | LimitsParam | Min and max value of offset along z | |
zRotationLimits | LimitsParam | Min and max value of rotation around z | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the parallel constraint
#
createPartCreates a new root part. This is the top level part.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
name? | string | [optional] name of the part. Default = 'Part' |
Returns ID
Id of the root part
Example
#
createPartAsTemplateCreates a new part template. This template will be added to the part container and can be instantiated multiple times in the root assembly or in assembly templates. Part templates can only be created if the root is already an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
name? | string | [optional] name of the part. Default = 'Part' |
Returns ID
Id of the part template
Example
#
createPlanarConstraintCreates a planar constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
zOffset | number l string | Defines a offset in z-axis from mate1 to mate2 | |
xOffsetLimits | LimitsParam | Min and max value of offset along x | |
yOffsetLimits | LimitsParam | Min and max value of offset along y | |
zRotationLimits | LimitsParam | Min and max value of rotation around z | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the planar constraint
#
createRevoluteConstraintCreates a revolute constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
zOffset | number l string | Defines a offset in z-axis from mate1 to mate2 | |
zRotationLimits | LimitsParam | Min and max value of rotation around z | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the revolute constraint
#
createRootAssemblyCreates a new root assembly. This is the top level assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
name? | string | [optional] name of the root assembly. Default = 'AssemblyRoot' | |
options.ident? | ObjectIdent |
Returns ID
Id of the root assembly
Example
#
createSceneCreates the threeJS scene of any product (part or assembly).
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId? | VID | Id of the product to create scene from | |
options.meshPerGeometry? | boolean | ||
options.structureOnly? | boolean |
Returns Promise<{ scene: Scene; nodes: { [key: string]: Object3D }; materials: { [key: string]: Material } }>
Object containing all the created THREE objects like scene, nodes and materials
#
createSliderConstraintCreates a slider constraint between mate1 and mate2 within an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the root assembly or an assembly template to create constraints on | |
mate1 | MateParam | Contains the mate path ids to its part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
mate2 | MateParam | Contains the mate path ids to its 2nd part and its work coordinate system id, and also the flip (0-5) and reoriented (0-3) states | |
xOffset | number l string | Defines a offset in x-axis from mate1 to mate2 | |
yOffset | number l string | Defines a offset in y-axis from mate1 to mate2 | |
zOffsetLimits | LimitsParam | Min and max value of offset along z | |
name | string | Name of the constraint |
Returns Promise<ObjectID | null>
Id of the slider constraint
#
createWorkAxisCreates a new work axis for the given part
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to add the new work axis to | |
type | WorkAxisType | Type of the work axis | |
references | VID[] | References for the work axis, needed for all types except 'Custom' | |
position | Vec<number l string> | Position of axis, only needed if type = 'Custom' | |
direction | Vec<number l string> | Direction of axis, only needed if type = 'Custom' | |
local | boolean | If true, work axis is set in local coordinates of part??? | |
name? | string | Name of the work axis, if not set default name = 'WorkAxis' |
Returns ID
Id of the work axis
#
createWorkCoordSystemCreates a new work coordinate system for the given part.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to add the new work coord system to | |
type | WorkCoordSystemType | Type of the work coordinate system | |
references | VID[] | References for the work coordinate system (point and 2 axis). If empty array, the work coordinate system will set to origin (0, 0, 0) | |
offset | Vec<number l string> | Offset from work coordinate system in x-, y- and z-direction | |
rotation | Vec<number l string> | Rotation around x-, y- and z-axis from work coordinate system | |
inverted | boolean | Inverts the direction of the primary axis | |
name? | string | Name of the work coordinate system, if not set default name = 'WorkCoordSystem' |
Returns ID
Id of the work coordinate system
Example
#
createWorkPlaneCreates a new work plane for the given part
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to add the new work plane to | |
type | WorkPlaneType | Type of the work plane | |
references | VID[] | References for the work plane, needed for all types except 'Custom' | |
offset | number | Offset in normal direction, can be used for all types except 'LinePlaneAndAngle' | |
angle | number | Angle in degrees, needed for type 'LinePlaneAndAngle' | |
position | Vec<number l string> | Position of plane, only needed if type = 'Custom' | |
normal | Vec<number l string> | Normal vector of work plane, only needed if type = 'Custom' | |
local | boolean | If true, work plane is set in local coordinates of part??? | |
name? | string | Name of the work plane, if not set default name = 'WorkAxis' |
Returns ID
Id of the work plane
#
createWorkPointCreates a new work point for the given part
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to add the new work point to | |
type | WorkPointType | Type of the work point | |
references | VID[] | References for the work point, needed for all types except 'Custom' | |
position | Vec<number l string> | Position of point, only needed if type = 'Custom' | |
local | boolean | If true, work point is set in local coordinates of part??? | |
name? | string | Name of the work point, if not set default name = 'WorkPoint' |
Returns ID
Id of the work point
#
cylinderCreates a cylinder operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the cylinder will be created | |
references | VID[] | Reference of work coordinate system to place the cylinder at | |
diameter | number l string | Diameter of the cylinder (x/y-axis) | |
height | number l string | Height of the cylinder (z-axis) |
Returns ID
Id of the cylinder operation
Example
#
deleteExpressionsDeletes existing expressions.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID l ObjectIdent | Id or identifier of part to delete expressions from | |
members | string[] | Name of members to delete |
Returns Promise<boolean>
True or false, depending on whether deleting the expressions was successful or not
Example
#
exportDXFExport the placed views as dxf file.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product where the views exist for export | |
dxfTemplateFilename? | string | Optional filename to load different dxf template. E.g. 'StandardTemplate.dxf' |
Returns Promise<Uint8Array | null>
Example
#
exportSVGExports the placed views as dxf and converts it into svg stream.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product where the views exist for export | |
modus? | SVGModusType | Optional modus to define how drawing will fit into svg file, - SVGModusType.WHOLE_DRAWING or SVGModusType.FIT_WHOLE_DRAWING - Default = SVGModusType.FIT_WHOLE_DRAWING | |
renderSize.x | number | ||
renderSize.y | number | ||
dxfTemplateFilename? | string | Optional filename to load different dxf template. E.g. 'StandardTemplate.dxf' |
Returns Promise<Uint8Array | null>
Example
#
extrusionCreates an extrusion operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to create the extrusion in. | |
sketchOrRegionIds | VID l VIDs | Id of the sketch to extrude or multiple ids of sketch regions | |
type | ExtrusionType | Type of extrusion (up, down, symmetric, custom) | |
limit1 | number l string | Start of extrusion (0 = start at sketch, only for type custom necessary) | |
limit2 | number l string | End of extrusion, which is actually the height | |
taperAngle | number l string | Angle of taper for extrusion | |
direction | Vec<number l string> | Direction of extrusion | |
capEnds | 0 l 1 | If true, ends will be capped, else a sheet will be created |
Returns ID
Id of the extrusion operation
#
filletCreates a fillet operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the fillet will be created | |
references | VIDs | Edge references where the fillet will be created on | |
radius | number l string | Radius of the fillet |
Returns ID
Id of the fillet operation
Example
#
findGeometryFind geometries of given type on solids in the given part at the given global positions.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where geometries tried to be found. | |
type | GrT | Type of the geometry to look for | |
positions | Vec[][] | Array of elements containing one or more positions to look for the geometry |
Returns IDs
Array containing ids of found geometries
Example
#
findInstanceFind first instance which can be identified by given identifier or name. If both optional parameters has been set, the identifier is treated with priority. If no instance with given identifier will be found, the name is used to find an instance.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
options.instanceIdent? | ObjectIdent | Identifier to find the instance by an identifier | |
options.instanceName? | string | Name to find the instance by its name |
Returns ID
First found instance which meets the searching conditions or null if nothing could be found
#
getAssemblyTemplateReturns the assembly template with given name from assembly container. If asmName is empty, all assemblies from assembly container will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
asmName? | string | Name of assembly to look for |
Returns IDs
Array containing ids of assembly templates
#
getBoundaryBoxFromViewsThis method returns the boundary box of the given views.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product from where the boundary box will returned | |
viewTypes? | ViewType[] | Array of view types. E.g. 'Top', 'Front', 'Iso', ... |
Returns Promise<[Vec, Vec][]>
Array of tuples, each tuple contains a min and max value for one of the given view types. The min an max values represent a Vector with x-, y- and z-coordinates.
Example
#
getCircularPatternConstraintReturns the circular pattern constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<CircularPatternConstraintType>
Found circular pattern constraint as object.
#
getConstraintDEPRECATED use specific methods e.g. getFastenedConstraint() instead, getConstraint() will be removed in a future release.
Returns information about a constraint in the given reference
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
refId | VID | Id of the reference to look for the constraint | |
constrName? | string | Name of the constraint to look for |
Returns Promise<ConstraintType>
Array containing information about the constraint
[
constraintId,
[ reference id of first mate, workcoordsystem id of first mate, flip type of first mate, reoriented type of first mate ],
[ reference id of second mate, workcoordsystem id of second mate, flip type of second mate, reoriented type of second mate ],
xOffset,
yOffset,
zOffset
]
#
getCurrentInstanceReturns the id of the current instance
Declaration
Returns ID
Id of the current instance
#
getCurrentProductReturns the id of the current product
Declaration
Returns ID
#
getCylindricalConstraintReturns the cylindrical constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<CylindricalConstraintType>
Found cylindrical constraint as object.
#
getDrawingReturns the drawing of the current headless-session
Declaration
Returns DrawingState
DrawingState
Example
#
getDrawingIdReturns the drawing id of the current headless-session
Declaration
Returns DrawingID
DrawingID
Example
#
getFastenedConstraintReturns the fastened constraint of given instance or assembly id with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<FastenedConstraintType>
Found fastened constraint as object.
#
getFastenedOriginConstraintReturns the fastened origin constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<FastenedOriginConstraintType>
Found fastened origin constraint as object.
#
getFeatureByNameReturns the id of the feature / operation with name = featureName. The feature can then be used for further operations, like boolean, transformations and so on.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where to look for the feature / operation | |
featureName | string | Name of the feature to look for |
Returns ID
Id of the feature / operation
#
getGeometryInformationReturns an object containing the center of gravity and the volume of the given product, instance or solid. Depending on the input parameter the calculations were made on a single solid, a part, a subassembly, the whole model, ... E.g. the center of gravity of a root assembly, will be the sum of all solid's center of gravity over the whole assembly structure
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the part, assembly, instance or solid we want the information from |
Returns Promise<ModelInfo | null>
Object containing the geometry information
#
getGroupConstraintReturns the group constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<GroupConstraintType>
Found group constraint as object.
#
getInstanceReturns an instance or all instances of a node, depending on whether a name is given or not. The node is the parent of the instance/instances we're looking for and can be a root assembly, another instance or an assembly template.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the node from which we are searching the children for instances that have the name we are looking for. | |
instanceName? | string | Name of the instance we are looking for |
Returns IDs
Array containing the ids of the found instances
#
getLinearPatternConstraintReturns the linear pattern constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<LinearPatternConstraintType>
Found linear pattern constraint as object.
#
getMatePathCreates and returns the mate path as array from the given instance id up to the current instance. This helps to get the right path to set constraints between instances which are located in nested assemblies.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
instanceId | VID l ObjectIdent | Id of the instance to get the mate path from |
Returns Promise<ObjectID[]>
Array containing the ids as a path from given instance to current instance
#
getParallelConstraintReturns the parallel constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<ParallelConstraintType>
Found parallel constraint as object.
#
getPartTemplateReturns the part template with given name from part container. If partName is empty, all parts from part container will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partName? | string | Name of part to look for |
Returns IDs
Array containing ids of part templates
#
getPlanarConstraintReturns the planar constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<PlanarConstraintType>
Found planar constraint as object.
#
getProductsOfInstancesReturns the product ids of the given instance ids.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
instanceIds | VID[] | Ids of the instances to get the product ids from |
Returns IDs
Array containing the product ids of the given instance ids
#
getRevoluteConstraintReturns the revolute constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<RevoluteConstraintType>
Found revolute constraint as object.
#
getSketchReturns the sketch with the given sketchName from the given instance or part id. If sketchName is not set, all sketches of the reference will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or part to look for the sketch | |
sketchName? | string | Name of the sketch to look for |
Returns IDs
Array containing ids of the sketches
#
getSketchRegionReturns the sketch region with the given sketchRegionName from the given instance or part id. If sketchRegionName is not set, all sketch regions of the reference will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or part to look for the sketch region | |
sketchRegionName? | string | Name of the sketch region to look for |
Returns IDs
Array containing ids of the sketch regions
#
getSliderConstraintReturns the slider constraint of given instance or assembly with specified name.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or assembly to look for the constraint | |
constrName | string | Name of the constraint to look for |
Returns Promise<SliderConstraintType>
Found slider constraint as object.
#
getStateReturns the state tree of the current headless-session
Declaration
Returns BuerliState
BuerliState
Example
#
getTransformationReturns the global transformation of the given id. Currently only ids of instances supported.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the object to get the global transformation from |
Returns Promise<number[][]>
Transformation of instance as two-dimensional array containing origin position and direction for x, y and z
[
[origin.x, origin.y, origin.z],
[xVec.x, xVec.y, xVec.z],
[yVec.x, yVec.y, yVec.z],
[zVec.x, zVec.y, zVec.z]
]
#
getWorkCoordSystemDEPRECATED use getWorkGeometry() instead, getWorkCoordSystem() will be removed in a future release.
Returns the work coord system with the given wcsName from the given reference. If wcsName is not set, all work coord systems of the reference will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | ||
wcsName? | string | Name of the work coord system to look for |
Returns IDs
Array containing ids of work coordinate systems
Example
#
getWorkGeometryReturns the work geometry of given type with given name from the given instance or part id. If the name of the work geometry is empty, all found work geometry of given type is returned
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance or part to look for the work geometry | |
type | WorkGeomType | Type of the work geometry to look for | |
wgName? | string | Optional name of the work geometry to look for |
Returns IDs
Array containing ids of the work geometry
#
importFeatureCreates a import feature operation and appends geometry to it. This method can be used to import specific geometry which can be used for further operations like boolean, translations and so on.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where to add the new feature | |
content | ArrayBuffer | Data buffer to add to the import feature | |
format | 'stp' l 'step' | The content format | |
name? | string | Optional name for the feature, default = 'Import' |
Returns ID
Id of the import feature operation
#
linearPatternCreates a linear pattern operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to create the linear pattern in. | |
operations | VID[] | Ids of the operations which are used for this linear pattern operation, e.g. box, extrusion, chamfer operation | |
references1 | VID[] | References for the first axis of the pattern. E.g. edge / work axis or 2 vertices / work points | |
params1.inverted | 0 l 1 | ||
params1.distance | number l string | ||
params1.count | number l string | ||
params1.merged | 0 l 1 | ||
references2? | VID[] | Optional references for the second axis of the pattern. | |
params2.inverted | 0 l 1 | ||
params2.distance | number l string | ||
params2.count | number l string |
Returns ID
Id of the linear pattern operation
#
loadLoads the given buffer.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
content | ArrayBuffer | Data as arraybuffer | |
type | 'ofb' l 'stp' | Type of the data to load | |
options.ident? | ObjectIdent |
Returns Promise<number[] | null>
Array containing the id of the loaded product in the file
#
loadFromUrlLoads from the given url.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
url | string | The url to load data from. | |
filetype | 'ofb' l 'stp' | The type of data delivered by the url (ofb, stp). | |
options.ident? | ObjectIdent |
Returns Promise<number[] | null>
Array containing the id of the loaded product from url
#
loadProductLoads a product into the current drawing and adds it to the part- or assembly container.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
content | ArrayBuffer | Data as arraybuffer | |
type | 'ofb' l 'stp' | Type of the data to load | |
options.ident? | ObjectIdent |
Returns Promise<number[] | null>
Array containing the id of the loaded products
Example
#
loadProductFromUrlLoads a product from the given URL into the current drawing and adds it to the part- or assembly container.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
url | string | The url to load data from. | |
filetype | 'ofb' l 'stp' | The type of data delivered by the url ('ofb', 'stp'). | |
options.ident? | ObjectIdent |
Returns Promise<number[] | null>
Array containing the id of the loaded products
#
loadSketchLoads a sketch from a ofb filestream and adds its elements to a new sketch. The id of this new created sketch will be returned.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part we want to create the new sketch and copy the sketch elements into it | |
strm | ArrayBuffer | Stream of ofb file which contains the sketch | |
planeId | VID | Id of the face or workplane to set the new sketch on | |
name? | string | Optional name of the sketch to load from filestream |
Returns ID
Id of the new sketch, containing the sketch elements from loaded sketch
#
mirrorCreates a mirror operation. Mirrors the entities of an operation at the position of the plane reference
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the mirror will be created | |
operations | VID[] | Ids of the operations which are used for this mirror operation, e.g. box, extrusion, chamfer operation | |
references | VID[] | Id of the references which will be used to mirror (e.g. Workplane) |
Returns Promise<ObjectID | null>
#
pickDEPRECATED use findGeometry() instead, pick() will be removed in a future release.
Returns found vertices, edges or faces depending on given type and points. Given points define where to look for elements.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to pick elements | |
type | 'vertex' l 'edge' l 'face' | Type of element to pick | |
points | Vec[] | Points containing 3D coordinates to look for possible element |
Returns IDs
Array containing ids of found geometries
Example
#
place2DViewsPlace the 2D views relatively to the origin.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product where the views will be placed in | |
viewPositions | { viewType: ViewType vector: Vec }[] | Array of objects, containing the viewType and a vector which defines the moving vector of the given view |
Returns Promise<void>
Example
#
placeSketchPlace/position the sketch with plane, axis and origin references.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
sketchId | VID | Id of the sketch to place | |
planeId | VID | Id of a face or a workplane. This will be the plane where the sketch lies on. If a plane reference already exists, planeId is optional | |
invertPlane | boolean | If true, the normal of the plane will be inverted | |
axisId | VID | Optional id of an edge or workaxis. This will be the x-Axis | |
isXAxis | boolean | If true, the axisId will be the x-axis of the sketch, else the x-Axis will be the crossvector of the normal and the axisId | |
invertAxis | boolean | If true, the direction of the axis will be inverted | |
originId | VID | Optional point or vertex of the sketch's origin reference |
Returns Promise<void>
#
removeDimensionsRemove existing dimensions from the view.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
dimensionIds | VID[] | Ids of the dimensions to be removed |
Returns Promise<void>
Example
#
removeInstancesRemoves instances from root assembly, other instances or assembly templates.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
instances | { id: VID l ObjectIdent }[] | Array of instance objects. See following parameter descriptions. |
Returns Promise<void>
#
removeOperationsRemoves the given operations or the operations which are added after 'toOperation' in history, depending on whether operations or toOperation parameter is given.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
operations | VID[] | Ids of all to remove operations. First element in the array will be removed first. This means operations which depend on each other, need to be removed from newest to oldest. | |
toOperation | VID | All operations, from rollback bar until the id of this operation, will be deleted |
Returns Promise<void>
#
revolveCreates a revolve operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part to create the revolve in. | |
sketchOrRegionIds | VID l VIDs | Id of the sketch to extrude or multiple ids of sketch regions | |
axisIds | VID[] | Array of ids, either [lineId] or [point1Id, point2Id], ids can be both ccId or graphicId | |
angle1 | number l string | Start of revolve in degrees | |
angle2 | number l string | End of revolve in degrees | |
inverted | 0 l 1 | Flag, whether to invert the axis or not |
Returns ID
Id of the revolve operation
#
saveWrites the current drawing to a stream and returns the data.
Important notes about the ofb format:
- It contains binary geometry blocks.
- Do not try to convert it to text, the geometry blocks will get damaged!
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
type | 'ofb' l 'stp' | Type to write |
Returns Promise<Uint8Array | null>
Stream data
#
saveToUrlWrites the current drawing to a stream and POSTs the result to the given url.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
url | string | The url to POST the model to. | |
filetype | 'ofb' l 'stp' | The file type be saved (ofb, stp). |
Returns Promise<boolean>
True if saving was successful
#
selectGeometryImportant note: To use this method, you need to add the BuerliGeometry component to your application. Otherwise the selection of geometry won't work. See this link to buerli geometry
Lets the user select geometry in graphical interface. As soon as the geometry of given type has been selected, the method will return necessary information about it. See this link to selections
The userData of the returned object contains additional information about the selected geometry. All geometric information in the userData is already transformed to the correct position. This is especially important for assemblies.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
types | GrT[] | Array of types to filter user selection. | |
count? | number | Optional number of selections to make (count must be >= 1). Default = 1. |
Returns Promise<InteractionInfo<T>[]>
Array of objects containing information about selected geometries
#
setCurrentInstanceSets the instance with id to the new current instance
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
id | VID | Id of the instance to set as the current |
Returns Promise<void>
#
setCurrentProductSets the product with productId to the new current product
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
productId | VID | Id of the product to set as the current |
Returns Promise<void>
#
setExpressionsUpdates multiple expressions in different parts at once
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
expressions | { partId: VID l ObjectIdent members: { name: string; value: number l string }[] }[] | Array of expression objects containing the part id and the expression to set |
Returns Promise<boolean>
True, if updating expressions in all parts was successfull
#
setFacetingParametersSets the global faceting parameters that will stick for this drawing. This defines how detailed solids will be displayed and can yield smaller payloads.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
distanceTol | number | Distance tolerance | |
angleTol | number | Angle tolerance |
Returns Promise<void>
Void
Example
#
sliceCreates a slice operation. Slices the entities of the given operations by the given reference.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the slice will be created | |
operations | VID[] | Ids of the operations which are used for this slice operation, e.g. box, extrusion, chamfer operation | |
reference | VID | Id of the workplane reference to use for the slice | |
sideFlag | boolean | Flag to toggle which side of the slice will be kept |
Returns ID
Id of the slice operation
#
sliceBySheetCreates a slice by sheet operation. Slices the entity of an operation with a sheet entity of another operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the slice will be created | |
operationToSlice | VID | Id of the operation which will be sliced in this slice by sheet operation | |
operationOfSheet | VID | Id of the operation which is used as the slice | |
sideFlag | boolean | Flag to toggle which side of the slice will be kept |
Returns ID
Id of the slice by sheet operation
#
sphereCreates a sphere operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id of the part where the sphere will be created | |
references | VID[] | Reference of work coordinate system to place the cone at | |
radius | number l string | Bottom diameter of the cone |
Returns ID
Id of the sphere operation
Example
#
transformInstancesTransforms instances by the given transformation. The transformations are local to the instances parent, which is an assembly.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
instances | { id: VID l ObjectIdent transformation: Transform }[] | Array of instance objects. See following descriptions. |
Returns Promise<void>
#
translateCreates a translate operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
partId | VID | Id ot the part where features will be translated | |
operations | VID[] | Ids of the operations which are used for this translate operation, e.g. box, extrusion, chamfer operation | |
references | VID[] | References which define the direction of translation. E.g workaxis, 2 workpoints,.. | |
inverted | 0 l 1 | Flag if direction is inverted or not | |
distance | number l string | Distance of translation |
Returns ID
Id of the translate operation
#
twistCreates a twist operation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
param.partId | VID | ||
param.sketchOrRegionIds | VID l VIDs | ||
param.type | ExtrusionType | ||
param.limit1 | number l string | ||
param.limit2 | number l string | ||
param.direction? | Vec<number l string> | ||
param.twistAngle | number l string | ||
param.twistCenter? | Vec<number l string> | ||
param.capEnds | 0 l 1 |
Returns ID
Id of the twist operation
#
update3dConstraintValuesUpdates limited value specified (with 'paramName') of multiple constraints
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constrValues | { constrId: VID paramName: LimitedValue value: number }[] | Array of constraint value objects. See following parameter description for that. |
Returns Promise<void>
#
updateCircularPatternConstraintsUpdates multiple circular pattern constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID instanceId: VID mate1: MateParam instanceCount: number l string angle: number l string offset: number l string }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateCylindricalConstraintsUpdates multiple cylindrical constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam zOffsetLimits: LimitsParam zRotationLimits: LimitsParam }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateFastenedConstraintsUpdates multiple fastened constraints
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam xOffset: number l string yOffset: number l string zOffset: number l string xRotation?: number l string yRotation?: number l string zRotation?: number l string }[] | Array of constraint parameter objects. See following parameter descriptions. |
Returns Promise<void>
#
updateFastenedOriginConstraintsUpdates multiple fastened origin constraints
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam xOffset: number l string yOffset: number l string zOffset: number l string xRotation?: number l string yRotation?: number l string zRotation?: number l string }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateGroupConstraintsUpdates multiple group constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID instanceIds: VID[] }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateLinearPatternConstraintsUpdates multiple linear pattern constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID instanceId: VID mate1: MateParam firstDirInstanceCount: number l string firstDirDistance: number l string mate2?: MateParam secondDirInstanceCount?: number l string secondDirDistance?: number l string }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateParallelConstraintsUpdates multiple parallel constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam xOffsetLimits: LimitsParam yOffsetLimits: LimitsParam zOffsetLimits: LimitsParam zRotationLimits: LimitsParam }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updatePlanarConstraintsUpdates multiple planar constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam zOffset: number l string xOffsetLimits: LimitsParam yOffsetLimits: LimitsParam zRotationLimits: LimitsParam }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateRevoluteConstraintsUpdates multiple revolute constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam zOffset: number l string zRotationLimits: LimitsParam }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateSliderConstraintsUpdates multiple slider constraints.
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
constraints | { constrId: VID mate1: MateParam mate2: MateParam xOffset: number l string yOffset: number l string zOffsetLimits: LimitsParam }[] | Array of constraint parameter objects. See following descriptions. |
Returns Promise<void>
#
updateTranslateDEPRECATED use translate() instead, updateTranslate() will be removed in a future release.
Updates a already created translation. To update value will be distance of translation
Declaration
Params
Name | Type | Default | Description |
---|---|---|---|
translationId | VID | Id of the translation (feature id) which will be updated | |
distance | number | New value for distance |
Returns Promise<void>
#
TransformArray type containing three points of type Point = {x: number, y: number, z: number}.
- [0] = origin position containing x-, y- and z-coordinates
- [1] = x-direction vector
- [2] = y-direction vector
#
DimensionType#
ViewOptionsTypeMembers
Name | Type | Description |
---|---|---|
color | number | optional color (autocad color index) to set for the 2d view, if color = 256 then color will be taken from layer definition |
layer | string | optional layer to set for the 2d view, layers are defined in the dxf file |
#
FastenedOriginConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
xOffset | number l string | offset in x-direction |
yOffset | number l string | offset in y-direction |
zOffset | number l string | offset in z-direction |
xRotation | number l string | rotation around x-axis |
yRotation | number l string | rotation around y-axis |
zRotation | number l string | rotation around z-axis |
#
FastenedConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
xOffset | number l string | offset in x-direction |
yOffset | number l string | offset in y-direction |
zOffset | number l string | offset in z-direction |
xRotation | number l string | rotation around x-axis |
yRotation | number l string | rotation around y-axis |
zRotation | number l string | rotation around z-axis |
#
RevoluteConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
zOffset | number l string | offset in z-direction |
zRotationLimits | LimitsParam | min and max limit for the rotation around z-Axis |
#
SliderConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
xOffset | number l string | offset in x-direction |
yOffset | number l string | offset in y-direction |
zOffsetLimits | LimitsParam | min and max limit for the z-offset |
#
PlanarConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
zOffset | number l string | offset in z-direction |
xOffsetLimits | LimitsParam | min and max limit for the x-offset |
yOffsetLimits | LimitsParam | min and max limit for the y-offset |
zRotationLimits | LimitsParam | min and max limit for the rotation around z-Axis |
#
ParallelConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
xOffsetLimits | LimitsParam | min and max limit for the x-offset |
yOffsetLimits | LimitsParam | min and max limit for the y-offset |
zOffsetLimits | LimitsParam | min and max limit for the z-offset |
zRotationLimits | LimitsParam | min and max limit for the rotation around z-Axis |
#
CylindricalConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
mate1 | MateParam | first mate constraint |
mate2 | MateParam | second mate constraint |
zOffsetLimits | LimitsParam | min and max limit for the z-offset |
zRotationLimits | LimitsParam | min and max limit for the rotation around z-Axis |
#
GroupConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
instanceIds | VID[] | ids of instances to be grouped |
#
LinearPatternConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
instanceId | VID | id of the instance to be copied |
mate1 | MateParam | first mate constraint (z-axis sets the first direction) |
firstDirInstanceCount | number l string | number of copies over the first direction (set by z-axis of mate1) |
firstDirDistance | number l string | distance between copies over the first direction (set by z-axis of mate1) |
mate2 | MateParam | second mate constraint (z-axis sets the second direction) |
secondDirInstanceCount | number l string | number of copies over the second direction (set by z-axis of mate2) |
secondDirDistance | number l string | number of copies over the second direction (set by z-axis of mate2) |
#
CircularPatternConstraintTypeMembers
Name | Type | Description |
---|---|---|
constrId | VID | id of the constraint |
instanceId | VID | id of the instance to be copied |
mate1 | MateParam | first mate constraint (z-axis sets the rotation axis) |
instanceCount | number l string | total number of copies (clockwise around the axis set by z-axis of mate1) |
angle | number l string | angle between copies (clockwise around the axis set by z-axis of mate1) |
offset | number l string | offset between copies (set by z-axis of mate2) |
#
ConstraintTypeInformation about constraint. [ constraintId, [ path to product reference, workcoordsystem id of 1st mate, flip type of 1st mate, reoriented type of 1st mate ], [ path to product reference, workcoordsystem id of 2nd mate, flip type of 2nd mate, reoriented type of 2nd mate ], xOffset, yOffset, zOffset ]
#
VecGeneral, generic vector type representing following types:
- Value[]
- {x: Value, y: Value, z: Value}
- THREE.Vector See threejs documentation
- THREE.Euler See threejs documentation
Members
Name | Type | Description |
---|---|---|
x | Value | |
y | Value | |
z | Value |