Skip to main content

Solid

deleteSolid(param)

Deletes the given solids or all solids if no solids are provided.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to clear solids from
[param.ids]Array<(string|real|id)>ids of the solids to delete, if VOID all solids will be deleted

Example

res = api.v1.solid.deleteSolid({ id: 54, ids: [52, 25, 68] })

copy(param)

Creates a copy of the given solid

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: { target: id, copy: id }|VOID // id of the target solid and the copy solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create copy in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to copy
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this copy.

Example

res = api.v1.solid.copy({ id: 89, target: { id: 54 } })

box(param)

Creates a box

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created box solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the box solid in
param.lengthreallength of the box in x-direction
param.widthrealwidth of the box in y-direction
param.heightrealheight of the box in z-direction

Example

res = api.v1.solid.box({ id: 54, length: 150, width: 55, height: 258 })

sphere(param)

Creates a sphere

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created sphere solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the sphere solid in
param.radiusrealradius of the sphere

Example

res = api.v1.solid.sphere({ id: 54, radius: 60 })

cylinder(param)

Creates a cylinder

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created sphere solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the cylinder solid in
param.heightrealheight of the cylinder
param.diameterrealdiameter of the cylinder

Example

res = api.v1.solid.cylinder({ id: 54, height: 300, diameter: 50 })

cone(param)

Creates a cone

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created cone solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the cone solid in
param.heightrealheight of the cone
param.bDiameterrealdiameter at the bottom of the cone
param.tDiameterrealdiameter at the top of the cone

Example

res = api.v1.solid.cone({ id: 54, height: 300, bDiameter: 50, tDiameter: 0.1 })

extrusion(param)

Creates an extrusion by extruding a shape or sketch geometry

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created extrusion solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the extrusion in
param.directionpointdirection of the extrusion, includes the distance as well
param.curvesArray<id>either curves created with curveAPI or array of sketch elements

Example

res = api.v1.solid.extrusion({ id: 54, direction: [0, 0, 120], curves: shape })

fillet(param)

Creates a fillet at the given edges

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.radiusrealradius of the fillet
param.geomIdsArray<(string|real|id)>ids of the brep edges to create the fillet on

Example

res = api.v1.solid.fillet({ radius: 5, geomIds: [85, 89, 93, 97] })

revolve(param)

Creates a revolve by revolving a polyline

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created revolve solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the revolve in
param.originPospointorigin position of the rotation axis
param.directionpointdirection of the rotation axis
param.anglerealrotation angle of the revolve in radians
param.curvesArray<id>either curves created with curveAPI or array of sketchelements

Example

res = api.v1.solid.revolve({ id: 54, direction: [0,1,0], originPos: [0,0,0], angle: 180g, curves: shape });

intersection(param)

Creates an intersection between solids

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: {
target: id, // id of the solid used as target in this intersection
tools?: id[] | VOID // id of the solids used as tools in this intersection, if keepTools = TRUE
} | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the intersection in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid, to use as base for this boolean operation
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this boolean.
param.toolsArray<(string|real|id)> | Array<object>tools as ids of the features or solids or as objects containing an id and optional indices
param.tools[].idstring | real | idid of the feature or solid, to use as tool for this boolean operation
[param.tools[].indices]Array<real>if more than one solid is appended to the tool feature, the indices can be used to specifiy which solids of the feature be used for this boolean
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

res = api.v1.solid.intersection({ id: 106, target: { id: 58 }, tools: [{ id: 96 }] })
res = api.v1.solid.intersection({ id: 106, target: { id: 58 }, tools: [96] })

subtraction(param)

Creates a subtraction between solids

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: {
target: id, // id of the solid used as target in this subtraction
tools?: id[] | VOID // ids of the solids used as tools in this subtraction, if keepTools = TRUE
} | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the box solid in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid, to use as base for this boolean operation
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this boolean.
param.toolsArray<(string|real|id)> | Array<object>tools as ids of the features or solids or as objects containing an id and optional indices
param.tools[].idstring | real | idid of the feature or solid, to use as tool for this boolean operation
[param.tools[].indices]Array<real>if more than one solid is appended to the tool feature, the indices can be used to specifiy which solids of the feature be used for this boolean
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

res = api.v1.solid.subtraction({ id: 106, target: { id: 58 }, tools: [{ id: 96 }], keepTools: TRUE })
res = api.v1.solid.subtraction({ id: 106, target: { id: 58 }, tools: [96] })

union(param)

Creates a union between solids

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: {
target: id, // id of the solid used as target in this union
tools?: id[] | VOID // ids of the solids used as tools in this union, if keepTools = TRUE
} | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the box solid in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid, to use as base for this boolean operation
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this boolean.
param.toolsArray<(string|real|id)> | Array<object>tools as ids of the features or solids or as objects containing an id and optional indices
param.tools[].idstring | real | idid of the feature or solid, to use as tool for this boolean operation
[param.tools[].indices]Array<real>if more than one solid is appended to the tool feature, the indices can be used to specifiy which solids of the feature be used for this boolean
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

res = api.v1.solid.union({ id: 54, target: { id: 58 }, tools: [{ id: 96 }], keepTools: TRUE })
res = api.v1.solid.union({ id: 54, target: 58, tools: [96, 105], keepTools: TRUE })

mirror(param)

Mirrors the given solid at defined plane

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the mirror in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to mirror
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this mirror.
param.originPospointorigin position of the plane to mirror at
param.normalpointnormal direction of the plane to mirror at

Example

res = api.v1.solid.mirror({ id: 54, target: { id: 105 }, originPos: [50, 0, 0], normal: [0, 0, 1] })

translation(param)

Translates the given solid by the given vector. The vector is in coordinates of the part where the provided target (feature or solid) belongs to.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the translation in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to translate
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this translation.
param.translationpointtranslation vector along x, y and z-axis

Example

res = api.v1.solid.translation({ id: 54, target: { id: 105 }, translation: [0, 0, 85] })

offset(param)

Creates an offset solid of the given solid

Note: This functionality is a quite difficult and fragile one. Make sure you call it only on solids, where you can offset all faces, calculate the new trims AND dont change the topology of the solid i.e. the number of faces and edges remain the same.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the offset in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to create an offset from
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this offset.
param.distancerealdistance of the offset
[param.extend]booleanFALSEextend means that surfaces are extended beyound their current trimming curves (default=FALSE). If FALSE the algorithm fills the gap with fillets with radius equal distance.

Example

res = api.v1.solid.offset({ id: 54, target: { id: 85 }, distance: 10 })

rotation(param)

Rotates the given solid by the given rotation vector. The vector is in coordinates of the part where the provided target (feature or solid) belongs to. First the z-part of the rotation vector is performed, then the y-part and finally the x-part.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the rotation in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to rotate
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this rotation.
param.rotationpointrotation vector containing rotations around x, y, and z-axis

Example

res = api.v1.solid.rotation({ id: 54, target: { id: 89 }, rotation: [C:PI,0,0] });

scale(param)

Scales the given solid with a factor. The scale is in coordinates of the part where the provided target (feature or solid) belongs to.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the scale in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to scale
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this scale.
param.factorrealscale factor of the solid

Example

res = api.v1.solid.scale({ id: 54, target: { id: 56 }, factor: 2.5 })

slice(param)

Cuts the given solid at defined plane. The part on the negative side of normal vector is removed

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: {
target: id, // id of the sliced target
slice?: id | VOID // id of the slice if keepBoth = TRUE
} | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the sliced solid in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to slice
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this slice.
param.originPospointorigin position of the plane to cut at
param.normalpointnormal direction of the plane to cut at
[param.keepBoth]booleanTRUEflag to define whether both solids should be kept or not (default=TRUE)

Example

res = api.v1.solid.slice({ id: 54, target: { id: 56 }, originPos: [0, 0, 50], normal: [0, 1, 1], keepBoth: FALSE })

section(param)

The given solid is sectioned at the given plane.

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: id|VOID // id of the created section array
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the section
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid to create section in
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this section.
param.originPospointorigin position of the plane to cut at
param.normalpointnormal direction of the plane to cut at

Example

res = api.v1.solid.section({ id: 54, target: { id: 89 }, originPos: [0, 0, 120], normal: [0, 0, 1] })

merge(param)

Creates an merge between solids. This is NOT a union!

Kind: v1.solid function
Returns: object - object containing result and optional messages

{
result: {
target: id, // id of the solid used as target in this merge operation
tools?: id[] | VOID // ids of the solids used as tools in this merge operation, if keepTools = TRUE
} | VOID
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
ParamTypeDefaultDescription
paramobjectobject containing all the parameters
param.idstring | real | idid of the entity injection feature to create the box solid in
param.targetstring | real | id | objecttarget as id of the feature or solid or as object containing an id and optional indices
param.target.idstring | real | idid of the feature or solid, to use as base for this merge operation
[param.target.indices]Array<real>if more than one solid is appended to the target feature, the indices can be used to specifiy which solids of the feature be used for this merge.
param.toolsArray<(string|real|id)> | Array<object>tools as ids of the features or solids or as objects containing an id and optional indices
param.tools[].idstring | real | idid of the feature or solid, to use as tool for this merge operation
[param.tools[].indices]Array<real>if more than one solid is appended to the tool feature, the indices can be used to specifiy which solids of the feature be used for this merge
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

res = api.v1.solid.merge({ id: 54, target: { id: 58 }, tools: [{ id: 96 }], keepTools: TRUE })