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

api.v1.solid.deleteSolid({ id: entityInjectionFeature, ids: [solid1, solid, solid3] })
api.v1.solid.deleteSolid({ id: entityInjectionFeature })

copy(param)

Creates a copy of the given solid

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

{
result: id|VOID // id of the copy solid
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 copy in
param.targetstring | real | idid of the solid to copy
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the copied solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.copy({ id: entityInjectionFeature, target: solid })
api.v1.solid.copy({ id: entityInjectionFeature, target: solid, translation: [0, 0, 10], rotation: [0, 0, 1.57], rotateFirst: FALSE })

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
}
ParamTypeDefaultDescription
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
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the box solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.box({ id: entityInjectionFeature, length: 150, width: 55, height: 258 })
api.v1.solid.box({ id: entityInjectionFeature, length: 150, width: 55, height: 258, translation: [0, 0, 150] })

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
}
ParamTypeDefaultDescription
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
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the sphere solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.sphere({ id: entityInjectionFeature, radius: 60 })
api.v1.solid.sphere({ id: entityInjectionFeature, radius: 60, rotation: [1.57, 0, 0], translation: [0, 50, 0], rotateFirst: FALSE })

cylinder(param)

Creates a cylinder

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

{
result: id|VOID // id of the created cylinder solid
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 cylinder solid in
param.heightrealheight of the cylinder
param.diameterrealdiameter of the cylinder
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the cylinder solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.cylinder({ id: entityInjectionFeature, height: 300, diameter: 50 })
api.v1.solid.cylinder({ id: entityInjectionFeature, height: 50, diameter: 50, translation: [50, 0, 0] })

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
}
ParamTypeDefaultDescription
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
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the cone solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.cone({ id: entityInjectionFeature, height: 300, bDiameter: 50, tDiameter: 0.1 })
api.v1.solid.cone({ id: entityInjectionFeature, height: 300, bDiameter: 50, tDiameter: 0.1, rotation: [0, 0, 3.1415] })
api.v1.solid.cone({ id: entityInjectionFeature, height: 300, bDiameter: 50, tDiameter: 0.1, translation: [0, 0, 10] })

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
}
ParamTypeDefaultDescription
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<(string|real|id)> | string | real | ideither an array of sketch element ids or a shape id, which is a container for curves created with the curveAPI
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the extruded solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.extrusion({ id: entityInjectionFeature, direction: [0, 0, 120], curves: shape })
api.v1.solid.extrusion({ id: entityInjectionFeature, direction: [0, 0, 120], curves: shape, rotation: [0, 0, 1.57] })

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
}
ParamTypeDefaultDescription
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<(string|real|id)> | string | real | ideither an array of sketch element ids or a shape id, which is a container for curves created with the curveAPI
[param.rotation]pointrotation vector containing rotations around x, y, and z-axis
[param.translation]pointtranslation vector along x, y and z-axis
[param.rotateFirst]booleanTRUEflag to define whether the revolved solid should be first rotated or not, when both rotation and translation is provided (default=TRUE)

Example

api.v1.solid.revolve({ id: entityInjectionFeature, direction: [0, 1, 0], originPos: [0, 0, 0], angle: 3.14, curves: shape })
api.v1.solid.revolve({ id: entityInjectionFeature, direction: [0, 1, 0], originPos: [0, 0, 0], angle: 3.14, curves: shape, translation: [20, 0, 20] })

intersection(param)

Creates an intersection between solids

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 intersection in
param.targetstring | real | idsolid to use as base for this boolean operation
param.toolsArray<(string|real|id)>solids to use as tools for this boolean operation
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

api.v1.solid.intersection({ id: entityInjectionFeature, target: solid, tools: [solid2] })

subtraction(param)

Creates a subtraction between solids

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 box solid in
param.targetstring | real | idsolid to use as base for this boolean operation
param.toolsArray<(string|real|id)>solids to use as tools for this boolean operation
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

api.v1.solid.subtraction({ id: entityInjectionFeature, target: solid, tools: [solid2] })

union(param)

Creates a union between solids

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 box solid in
param.targetstring | real | idsolid to use as base for this boolean operation
param.toolsArray<(string|real|id)>solids to use as tools for this boolean operation
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

api.v1.solid.union({ id: entityInjectionFeature, target: solid, tools: [solid1, solid2], 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 | idsolid to mirror
param.originPospointorigin position of the plane to mirror at
param.normalpointnormal direction of the plane to mirror at

Example

api.v1.solid.mirror({ id: entityInjectionFeature, target: solid, 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 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 | idsolid to translate
param.translationpointtranslation vector along x, y and z-axis

Example

api.v1.solid.translation({ id: entityInjectionFeature, target: solid, 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 | idsolid to create an offset from
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

api.v1.solid.offset({ id: entityInjectionFeature, target: solid, distance: 10 })

rotation(param)

Rotates the given solid by the given rotation vector. The vector is in coordinates of the part where the provided 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 | idsolid to rotate
param.rotationpointrotation vector containing rotations around x, y, and z-axis

Example

api.v1.solid.rotation({ id: entityInjectionFeature, target: solid, rotation: [3.14, 0, 0] })

scale(param)

Scales the given solid with a factor. The scale is in coordinates of the part where the provided 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 | idsolid to scale
param.factorrealscale factor of the solid

Example

api.v1.solid.scale({ id: entityInjectionFeature, target: solid, 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: id | VOID // id of the slice if keepBoth flag is TRUE
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 | idsolid to 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

api.v1.solid.slice({ id: entityInjectionFeature, target: solid, 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 | idsolid to create section in
param.originPospointorigin position of the plane to cut at
param.normalpointnormal direction of the plane to cut at

Example

api.v1.solid.section({ id: entityInjectionFeature, target: solid, 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: 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 box solid in
param.targetstring | real | idsolid to use as base for this merge operation
param.toolsArray<(string|real|id)>solids to use as tools for this merge operation
[param.keepTools]booleanFALSEflag to define whether the tool solids should be kept or not (default=FALSE)

Example

api.v1.solid.merge({ id: entityInjectionFeature, target: solid, tools: [solid1, solid2], keepTools: TRUE })

fillet(param)

Creates a fillet at the given edges. Edges can be of different solids.

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 fillet in
param.radiusrealradius of the fillet
param.geomIdsArray<(string|real|id)>ids of the brep edges to create the fillet on

Example

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

useSolid(param)

This method allows you to work with solids from other features. The solids from the provided feature will be returned and available to use within the given entity injection feature.

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.fromArray<(string|real|id)> | Array<object>features as ids to get solids from or as objects containing an id and optional indices
param.from[].idstring | real | idid of the feature to get solids from
[param.from[].indices]Array<real>if more than one solid is appended to the feature, the indices can be used to specifiy which solids to get from feature
param.instring | real | idid of the entity injection feature to use the solids in

Example

api.v1.solid.useSolid({ from: [feature, feature2], in: entityInjectionFeature })
api.v1.solid.useSolid({ from: [{ id: feature, indices: [0, 1] }], in: entityInjectionFeature })
api.v1.solid.useSolid({ from: [{ id: feature, indices: [0, 1] }, { id: feature2 }], in: entityInjectionFeature })