Skip to main content

_3DShape<Type>

Type parameters

NameType
Typeextends TopoDS_Shape

Hierarchy

Constructors

constructor

new _3DShape<Type>(ocShape)

Type parameters

NameType
Typeextends TopoDS_Shape

Parameters

NameType
ocShapeType

Inherited from

Shape.constructor

Defined in

shapes.ts:151

Accessors

boundingBox

get boundingBox(): BoundingBox

Returns

BoundingBox

Inherited from

Shape.boundingBox

Defined in

shapes.ts:309


edges

get edges(): Edge[]

Returns

Edge[]

Inherited from

Shape.edges

Defined in

shapes.ts:297


faces

get faces(): Face[]

Returns

Face[]

Inherited from

Shape.faces

Defined in

shapes.ts:301


hashCode

get hashCode(): number

Returns

number

Inherited from

Shape.hashCode

Defined in

shapes.ts:159


isNull

get isNull(): boolean

Returns

boolean

Inherited from

Shape.isNull

Defined in

shapes.ts:163


wires

get wires(): Wire[]

Returns

Wire[]

Inherited from

Shape.wires

Defined in

shapes.ts:305


wrapped

get wrapped(): Type

Returns

Type

Inherited from

Shape.wrapped

Defined in

register.ts:39

set wrapped(newWrapped): void

Parameters

NameType
newWrappedType

Returns

void

Inherited from

Shape.wrapped

Defined in

register.ts:44

Other Methods

clone

clone(): _3DShape<Type>

Returns

_3DShape<Type>

Inherited from

Shape.clone

Defined in

shapes.ts:155


delete

delete(): void

Returns

void

Inherited from

Shape.delete

Defined in

register.ts:54


isEqual

isEqual(other): boolean

Parameters

NameType
otherAnyShape

Returns

boolean

Inherited from

Shape.isEqual

Defined in

shapes.ts:171


isSame

isSame(other): boolean

Parameters

NameType
otherAnyShape

Returns

boolean

Inherited from

Shape.isSame

Defined in

shapes.ts:167


simplify

simplify(): _3DShape<Type>

Simplifies the shape by removing unnecessary edges and faces

Returns

_3DShape<Type>

Inherited from

Shape.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

Shape.blobSTEP

Defined in

shapes.ts:485


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

NameType
«destructured»Object
› angularToleranceundefined | number
› toleranceundefined | number

Returns

Blob

Inherited from

Shape.blobSTL

Defined in

shapes.ts:527


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

NameType
«destructured»Object
› angularToleranceundefined | number
› toleranceundefined | number

Returns

ShapeMesh

Inherited from

Shape.mesh

Defined in

shapes.ts:331


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

NameType
«destructured»Object
› angularToleranceundefined | number
› toleranceundefined | number

Returns

Object

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

Inherited from

Shape.meshEdges

Defined in

shapes.ts:368


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

Defined in

shapes.ts:1219


cut

cut(tool, «destructured»?): Shape3D

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

Parameters

NameType
toolShape3D
«destructured»Object
› optimisation?"none" | "commonFace" | "sameFace"

Returns

Shape3D

Defined in

shapes.ts:995


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

Defined in

shapes.ts:1172


fuse

fuse(other, «destructured»?): Shape3D

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

Parameters

NameType
otherShape3D
«destructured»Object
› optimisation?"none" | "commonFace" | "sameFace"

Returns

Shape3D

Defined in

shapes.ts:964


intersect

intersect(tool): AnyShape

Builds a new shape by intersecting this shape and another

Parameters

NameType
toolAnyShape

Returns

AnyShape

Defined in

shapes.ts:1025


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

Defined in

shapes.ts:1046

shell(thickness, finderFcn, tolerance?): Shape3D

Parameters

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

Returns

Shape3D

Defined in

shapes.ts:1050


Shape Transformations Methods

mirror

mirror(inputPlane, origin): _3DShape<Type>

Mirrors the shape through a plane

Parameters

NameType
inputPlanePoint | Plane | PlaneName
originPoint

Returns

_3DShape<Type>

Inherited from

Shape.mirror

Defined in

shapes.ts:264


rotate

rotate(angle, position?, direction?): _3DShape<Type>

Rotates the shape

Parameters

NameType
anglenumber
positionPoint
directionPoint

Returns

_3DShape<Type>

Inherited from

Shape.rotate

Defined in

shapes.ts:247


scale

scale(scale, center?): _3DShape<Type>

Returns a scaled version of the shape

Parameters

NameType
scalenumber
centerPoint

Returns

_3DShape<Type>

Inherited from

Shape.scale

Defined in

shapes.ts:278


translate

translate(xDist, yDist, zDist): _3DShape<Type>

Translates the shape of an arbitrary vector

Parameters

NameType
xDistnumber
yDistnumber
zDistnumber

Returns

_3DShape<Type>

Inherited from

Shape.translate

Defined in

shapes.ts:200

translate(vector): _3DShape<Type>

Parameters

NameType
vectorPoint

Returns

_3DShape<Type>

Inherited from

Shape.translate

Defined in

shapes.ts:201


translateX

translateX(distance): _3DShape<Type>

Translates the shape on the X axis

Parameters

NameType
distancenumber

Returns

_3DShape<Type>

Inherited from

Shape.translateX

Defined in

shapes.ts:220


translateY

translateY(distance): _3DShape<Type>

Translates the shape on the Y axis

Parameters

NameType
distancenumber

Returns

_3DShape<Type>

Inherited from

Shape.translateY

Defined in

shapes.ts:229


translateZ

translateZ(distance): _3DShape<Type>

Translates the shape on the Z axis

Parameters

NameType
distancenumber

Returns

_3DShape<Type>

Inherited from

Shape.translateZ

Defined in

shapes.ts:238