CompSolid
Hierarchy
_3DShape
<TopoDS_CompSolid
>↳
CompSolid
Constructors
constructor
• new CompSolid(ocShape
)
Parameters
Name | Type |
---|---|
ocShape | TopoDS_CompSolid |
Inherited from
Defined in
Accessors
boundingBox
• get
boundingBox(): BoundingBox
Returns
Inherited from
_3DShape.boundingBox
Defined in
edges
• get
edges(): Edge
[]
Returns
Edge
[]
Inherited from
_3DShape.edges
Defined in
faces
• get
faces(): Face
[]
Returns
Face
[]
Inherited from
_3DShape.faces
Defined in
hashCode
• get
hashCode(): number
Returns
number
Inherited from
_3DShape.hashCode
Defined in
isNull
• get
isNull(): boolean
Returns
boolean
Inherited from
_3DShape.isNull
Defined in
wires
• get
wires(): Wire
[]
Returns
Wire
[]
Inherited from
_3DShape.wires
Defined in
wrapped
• get
wrapped(): Type
Returns
Type
Inherited from
_3DShape.wrapped
Defined in
• set
wrapped(newWrapped
): void
Parameters
Name | Type |
---|---|
newWrapped | Type |
Returns
void
Inherited from
_3DShape.wrapped
Defined in
Other Methods
clone
▸ clone(): CompSolid
Returns
Inherited from
Defined in
delete
▸ delete(): void
Returns
void
Inherited from
Defined in
isEqual
▸ isEqual(other
): boolean
Parameters
Name | Type |
---|---|
other | AnyShape |
Returns
boolean
Inherited from
Defined in
isSame
▸ isSame(other
): boolean
Parameters
Name | Type |
---|---|
other | AnyShape |
Returns
boolean
Inherited from
Defined in
simplify
▸ simplify(): CompSolid
Simplifies the shape by removing unnecessary edges and faces
Returns
Inherited from
Defined in
Shape Export Methods
blobSTEP
▸ blobSTEP(): Blob
Exports the current shape as a STEP file as a Blob
Returns
Blob
Inherited from
Defined in
blobSTL
▸ blobSTL(«destructured»?
): Blob
Exports the current shape as a STL file as a Blob
In order to create a STL file, the shape needs to be meshed. The tolerances correspond to the values used to mesh the shape.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› angularTolerance | undefined | number |
› tolerance | undefined | number |
Returns
Blob
Inherited from
Defined in
mesh
▸ mesh(«destructured»?
): ShapeMesh
Exports the current shape as a set of triangle. These can be used by threejs for instance to represent the the shape
Parameters
Name | Type |
---|---|
«destructured» | Object |
› angularTolerance | undefined | number |
› tolerance | undefined | number |
Returns
Inherited from
Defined in
meshEdges
▸ meshEdges(«destructured»?
): Object
Exports the current shape as a set of lines. These can be used by threejs for instance to represent the edges of the shape
Parameters
Name | Type |
---|---|
«destructured» | Object |
› angularTolerance | undefined | number |
› tolerance | undefined | number |
Returns
Object
Name | Type |
---|---|
edgeGroups | { count : number ; edgeId : number ; start : number }[] |
lines | number [] |
Inherited from
Defined in
Shape Modifications Methods
chamfer
▸ chamfer(radiusConfig
, filter?
): Shape3D
Creates a new shapes with some edges chamfered, as specified in the radius config.
If the radius is a filter finder object (with an EdgeFinder as filter,
and a radius to specifiy the chamfer radius), the fillet will only be
applied to the edges as selected by the finder. The finder will be
deleted unless it is explicitly specified to keep
it.
If the radius is a number all the edges will be chamfered.
If the radius is a function edges will be chamfered according to the value returned by the function (0 or null will not add any chamfer).
Parameters
Name | Type |
---|---|
radiusConfig | RadiusConfig |
filter? | (e : EdgeFinder ) => EdgeFinder |
Returns
Inherited from
Defined in
cut
▸ cut(tool
, «destructured»?
): Shape3D
Builds a new shape by removing the tool tape from this shape
Parameters
Name | Type |
---|---|
tool | Shape3D |
«destructured» | Object |
› optimisation? | "none" | "commonFace" | "sameFace" |
Returns
Inherited from
Defined in
fillet
▸ fillet(radiusConfig
, filter?
): Shape3D
Creates a new shapes with some edges filletted, as specified in the radius config.
If the radius is a filter finder object (with an EdgeFinder as filter,
and a radius to specifiy the fillet radius), the fillet will only be
applied to the edges as selected by the finder. The finder will be
deleted unless it is explicitly specified to keep
it.
If the radius is a number all the edges will be filletted.
If the radius is a function edges will be filletted according to the value returned by the function (0 or null will not add any fillet).
Parameters
Name | Type |
---|---|
radiusConfig | RadiusConfig |
filter? | (e : EdgeFinder ) => EdgeFinder |
Returns
Inherited from
Defined in
fuse
▸ fuse(other
, «destructured»?
): Shape3D
Builds a new shape out of the two, fused, shapes
Parameters
Name | Type |
---|---|
other | Shape3D |
«destructured» | Object |
› optimisation? | "none" | "commonFace" | "sameFace" |
Returns
Inherited from
Defined in
intersect
▸ intersect(tool
): AnyShape
Builds a new shape by intersecting this shape and another
Parameters
Name | Type |
---|---|
tool | AnyShape |
Returns
Inherited from
Defined in
shell
▸ shell(config
, tolerance?
): Shape3D
Hollows out the current shape, removing the faces found by the filter
and
keeping a border of thickness
Parameters
Name | Type |
---|---|
config | Object |
config.filter | FaceFinder |
config.thickness | number |
tolerance? | number |
Returns
Inherited from
Defined in
▸ shell(thickness
, finderFcn
, tolerance?
): Shape3D
Parameters
Name | Type |
---|---|
thickness | number |
finderFcn | (f : FaceFinder ) => FaceFinder |
tolerance? | number |
Returns
Inherited from
Defined in
Shape Transformations Methods
mirror
▸ mirror(inputPlane
, origin
): CompSolid
Mirrors the shape through a plane
Parameters
Name | Type |
---|---|
inputPlane | Point | Plane | PlaneName |
origin | Point |
Returns
Inherited from
Defined in
rotate
▸ rotate(angle
, position?
, direction?
): CompSolid
Rotates the shape
Parameters
Name | Type |
---|---|
angle | number |
position | Point |
direction | Point |
Returns
Inherited from
Defined in
scale
▸ scale(scale
, center?
): CompSolid
Returns a scaled version of the shape
Parameters
Name | Type |
---|---|
scale | number |
center | Point |
Returns
Inherited from
Defined in
translate
▸ translate(xDist
, yDist
, zDist
): CompSolid
Translates the shape of an arbitrary vector
Parameters
Name | Type |
---|---|
xDist | number |
yDist | number |
zDist | number |
Returns
Inherited from
Defined in
▸ translate(vector
): CompSolid
Parameters
Name | Type |
---|---|
vector | Point |
Returns
Inherited from
Defined in
translateX
▸ translateX(distance
): CompSolid
Translates the shape on the X axis
Parameters
Name | Type |
---|---|
distance | number |
Returns
Inherited from
Defined in
translateY
▸ translateY(distance
): CompSolid
Translates the shape on the Y axis
Parameters
Name | Type |
---|---|
distance | number |
Returns
Inherited from
Defined in
translateZ
▸ translateZ(distance
): CompSolid
Translates the shape on the Z axis
Parameters
Name | Type |
---|---|
distance | number |