Skip to main content

Class: Compound

Hierarchy​

Constructors​

constructor​

• new Compound(ocShape)

Parameters​

NameType
ocShapeTopoDS_Compound

Inherited from​

_3DShape.constructor

Defined in​

shapes.ts:151

Accessors​

boundingBox​

• get boundingBox(): BoundingBox

Returns​

BoundingBox

Inherited from​

_3DShape.boundingBox

Defined in​

shapes.ts:303


edges​

• get edges(): Edge[]

Returns​

Edge[]

Inherited from​

_3DShape.edges

Defined in​

shapes.ts:291


faces​

• get faces(): Face[]

Returns​

Face[]

Inherited from​

_3DShape.faces

Defined in​

shapes.ts:295


hashCode​

• get hashCode(): number

Returns​

number

Inherited from​

_3DShape.hashCode

Defined in​

shapes.ts:159


isNull​

• get isNull(): boolean

Returns​

boolean

Inherited from​

_3DShape.isNull

Defined in​

shapes.ts:163


wires​

• get wires(): Wire[]

Returns​

Wire[]

Inherited from​

_3DShape.wires

Defined in​

shapes.ts:299


wrapped​

• get wrapped(): Type

Returns​

Type

Inherited from​

_3DShape.wrapped

Defined in​

register.ts:39

• set wrapped(newWrapped): void

Parameters​

NameType
newWrappedType

Returns​

void

Inherited from​

_3DShape.wrapped

Defined in​

register.ts:44

Other Methods​

clone​

▸ clone(): Compound

Returns​

Compound

Inherited from​

_3DShape.clone

Defined in​

shapes.ts:155


delete​

▸ delete(): void

Returns​

void

Inherited from​

_3DShape.delete

Defined in​

register.ts:54


isEqual​

▸ isEqual(other): boolean

Parameters​

NameType
otherAnyShape

Returns​

boolean

Inherited from​

_3DShape.isEqual

Defined in​

shapes.ts:171


isSame​

▸ isSame(other): boolean

Parameters​

NameType
otherAnyShape

Returns​

boolean

Inherited from​

_3DShape.isSame

Defined in​

shapes.ts:167


simplify​

▸ simplify(): Compound

Simplifies the shape by removing unnecessary edges and faces

Returns​

Compound

Inherited from​

_3DShape.simplify

Defined in​

shapes.ts:178


Shape Export Methods​

blobSTEP​

▸ blobSTEP(): Blob

Exports the current shape as a STEP file as a Blob

Returns​

Blob

Inherited from​

_3DShape.blobSTEP

Defined in​

shapes.ts:479


blobSTL​

▸ blobSTL(__namedParameters?): 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​

NameType
__namedParametersObject
__namedParameters.angularToleranceundefined | number
__namedParameters.toleranceundefined | number

Returns​

Blob

Inherited from​

_3DShape.blobSTL

Defined in​

shapes.ts:518


mesh​

▸ mesh(__namedParameters?): ShapeMesh

Exports the current shape as a set of triangle. These can be used by threejs for instance to represent the the shape

Parameters​

NameType
__namedParametersObject
__namedParameters.angularToleranceundefined | number
__namedParameters.toleranceundefined | number

Returns​

ShapeMesh

Inherited from​

_3DShape.mesh

Defined in​

shapes.ts:325


meshEdges​

▸ meshEdges(__namedParameters?): 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​

NameType
__namedParametersObject
__namedParameters.angularToleranceundefined | number
__namedParameters.toleranceundefined | number

Returns​

Object

NameType
edgeGroups{ count: number ; edgeId: number ; start: number }[]
linesnumber[]

Inherited from​

_3DShape.meshEdges

Defined in​

shapes.ts:362


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​

NameType
radiusConfigRadiusConfig
filter?(e: EdgeFinder) => EdgeFinder

Returns​

Shape3D

Inherited from​

_3DShape.chamfer

Defined in​

shapes.ts:1204


cut​

▸ cut(tool, __namedParameters?): Shape3D

Builds a new shape by removing the tool tape from this shape

Parameters​

NameType
toolShape3D
__namedParametersObject
__namedParameters.optimisation?"none" | "commonFace" | "sameFace"

Returns​

Shape3D

Inherited from​

_3DShape.cut

Defined in​

shapes.ts:983


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​

NameType
radiusConfigRadiusConfig
filter?(e: EdgeFinder) => EdgeFinder

Returns​

Shape3D

Inherited from​

_3DShape.fillet

Defined in​

shapes.ts:1159


fuse​

▸ fuse(other, __namedParameters?): Shape3D

Builds a new shape out of the two, fused, shapes

Parameters​

NameType
otherShape3D
__namedParametersObject
__namedParameters.optimisation?"none" | "commonFace" | "sameFace"

Returns​

Shape3D

Inherited from​

_3DShape.fuse

Defined in​

shapes.ts:955


intersect​

▸ intersect(tool): AnyShape

Builds a new shape by intersecting this shape and another

Parameters​

NameType
toolAnyShape

Returns​

AnyShape

Inherited from​

_3DShape.intersect

Defined in​

shapes.ts:1012


shell​

▸ shell(config, tolerance?): Shape3D

Hollows out the current shape, removing the faces found by the filter and keeping a border of thickness

Parameters​

NameType
configObject
config.filterFaceFinder
config.thicknessnumber
tolerance?number

Returns​

Shape3D

Inherited from​

_3DShape.shell

Defined in​

shapes.ts:1035

▸ shell(thickness, finderFcn, tolerance?): Shape3D

Parameters​

NameType
thicknessnumber
finderFcn(f: FaceFinder) => FaceFinder
tolerance?number

Returns​

Shape3D

Inherited from​

_3DShape.shell

Defined in​

shapes.ts:1039


Shape Transformations Methods​

mirror​

▸ mirror(inputPlane, origin): Compound

Mirrors the shape through a plane

Parameters​

NameType
inputPlanePlane | PlaneName | Point
originPoint

Returns​

Compound

Inherited from​

_3DShape.mirror

Defined in​

shapes.ts:258


rotate​

▸ rotate(angle, position?, direction?): Compound

Rotates the shape

Parameters​

NameType
anglenumber
positionPoint
directionPoint

Returns​

Compound

Inherited from​

_3DShape.rotate

Defined in​

shapes.ts:241


scale​

▸ scale(scale, center?): Compound

Returns a scaled version of the shape

Parameters​

NameType
scalenumber
centerPoint

Returns​

Compound

Inherited from​

_3DShape.scale

Defined in​

shapes.ts:272


translate​

▸ translate(vector): Compound

Translates the shape of an arbitrary vector

Parameters​

NameType
vectorPoint

Returns​

Compound

Inherited from​

_3DShape.translate

Defined in​

shapes.ts:200


translateX​

▸ translateX(distance): Compound

Translates the shape on the X axis

Parameters​

NameType
distancenumber

Returns​

Compound

Inherited from​

_3DShape.translateX

Defined in​

shapes.ts:214


translateY​

▸ translateY(distance): Compound

Translates the shape on the Y axis

Parameters​

NameType
distancenumber

Returns​

Compound

Inherited from​

_3DShape.translateY

Defined in​

shapes.ts:223


translateZ​

▸ translateZ(distance): Compound

Translates the shape on the Z axis

Parameters​

NameType
distancenumber

Returns​

Compound

Inherited from​

_3DShape.translateZ

Defined in​

shapes.ts:232