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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id 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] })
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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create copy in |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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
api.v1.solid.copy({ id: entityInjectionFeature, target: solid })
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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the box solid in |
param.length | real | length of the box in x-direction |
param.width | real | width of the box in y-direction |
param.height | real | height of the box in z-direction |
Example
api.v1.solid.box({ id: entityInjectionFeature, 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the sphere solid in |
param.radius | real | radius of the sphere |
Example
api.v1.solid.sphere({ id: entityInjectionFeature, 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 cylinder solid
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the cylinder solid in |
param.height | real | height of the cylinder |
param.diameter | real | diameter of the cylinder |
Example
api.v1.solid.cylinder({ id: entityInjectionFeature, 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the cone solid in |
param.height | real | height of the cone |
param.bDiameter | real | diameter at the bottom of the cone |
param.tDiameter | real | diameter at the top of the cone |
Example
api.v1.solid.cone({ id: entityInjectionFeature, 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the extrusion in |
param.direction | point | direction of the extrusion, includes the distance as well |
param.curves | Array<(string|real|id)> | string | real | id | either an array of sketch element ids or a shape id, which is a container for curves created with the curveAPI |
Example
api.v1.solid.extrusion({ id: entityInjectionFeature, direction: [0, 0, 120], curves: shape })
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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the revolve in |
param.originPos | point | origin position of the rotation axis |
param.direction | point | direction of the rotation axis |
param.angle | real | rotation angle of the revolve in radians |
param.curves | Array<(string|real|id)> | string | real | id | either an array of sketch element ids or a shape id, which is a container for curves created with the curveAPI |
Example
api.v1.solid.revolve({
id: entityInjectionFeature,
direction: [0, 1, 0],
originPos: [0, 0, 0],
angle: 3.14,
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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the intersection in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.tools | Array<(string|real|id)> | Array<object> | tools as ids of the features or solids or as objects containing an id and optional indices | |
param.tools[].id | string | real | id | id 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] | boolean | FALSE | flag to define whether the tool solids should be kept or not (default=FALSE) |
Example
api.v1.solid.intersection({ id: entityInjectionFeature, target: solid, tools: [{ id: pattern, indices: [2] }] })
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: {
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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the box solid in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.tools | Array<(string|real|id)> | Array<object> | tools as ids of the features or solids or as objects containing an id and optional indices | |
param.tools[].id | string | real | id | id 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] | boolean | FALSE | flag to define whether the tool solids should be kept or not (default=FALSE) |
Example
api.v1.solid.subtraction({
id: entityInjectionFeature,
target: solid,
tools: [{ id: pattern, indices: [3] }],
keepTools: TRUE,
})
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: {
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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the box solid in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.tools | Array<(string|real|id)> | Array<object> | tools as ids of the features or solids or as objects containing an id and optional indices | |
param.tools[].id | string | real | id | id 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] | boolean | FALSE | flag to define whether the tool solids should be kept or not (default=FALSE) |
Example
api.v1.solid.union({
id: entityInjectionFeature,
target: solid,
tools: [{ id: pattern, indices: [5] }],
keepTools: TRUE,
})
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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the mirror in |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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.originPos | point | origin position of the plane to mirror at |
param.normal | point | normal 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 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the translation in |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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.translation | point | translation 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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the offset in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.distance | real | distance of the offset | |
[param.extend] | boolean | FALSE | extend 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 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the rotation in |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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.rotation | point | rotation 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 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the scale in |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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.factor | real | scale 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: {
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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the sliced solid in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.originPos | point | origin position of the plane to cut at | |
param.normal | point | normal direction of the plane to cut at | |
[param.keepBoth] | boolean | TRUE | flag 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
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the section |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices |
param.target.id | string | real | id | id 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.originPos | point | origin position of the plane to cut at |
param.normal | point | normal 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: {
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
}
Param | Type | Default | Description |
---|---|---|---|
param | object | object containing all the parameters | |
param.id | string | real | id | id of the entity injection feature to create the box solid in | |
param.target | string | real | id | object | target as id of the feature or solid or as object containing an id and optional indices | |
param.target.id | string | real | id | id 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.tools | Array<(string|real|id)> | Array<object> | tools as ids of the features or solids or as objects containing an id and optional indices | |
param.tools[].id | string | real | id | id 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] | boolean | FALSE | flag 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 // ids of the filleted solids
messages?: { message: string, level: real, code: real, api: string }[]
maxLevel?: real
}
Param | Type | Description |
---|---|---|
param | object | object containing all the parameters |
param.id | string | real | id | id of the entity injection feature to create the fillet in |
param.radius | real | radius of the fillet |
param.geomIds | Array<(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] })