Class: Shape<Type>
Defined in: shapes.ts:229
Extends
WrappingObj<Type>
Extended by
Type Parameters
Type
Type extends TopoDS_Shape
Constructors
Constructor
new Shape<Type>(ocShape): Shape<Type>;
Defined in: shapes.ts:230
Parameters
ocShape
Type
Returns
Shape<Type>
Overrides
Other
boundingBox
Get Signature
get boundingBox(): BoundingBox;
Defined in: shapes.ts:417
Returns
edges
Get Signature
get edges(): Edge[];
Defined in: shapes.ts:405
Returns
Edge[]
faces
Get Signature
get faces(): Face[];
Defined in: shapes.ts:409
Returns
Face[]
hashCode
Get Signature
get hashCode(): number;
Defined in: shapes.ts:243
Returns
number
isNull
Get Signature
get isNull(): boolean;
Defined in: shapes.ts:247
Returns
boolean
wires
Get Signature
get wires(): Wire[];
Defined in: shapes.ts:413
Returns
Wire[]
wrapped
Get Signature
get wrapped(): Type;
Defined in: register.ts:39
Returns
Type
Set Signature
set wrapped(newWrapped): void;
Defined in: register.ts:44
Parameters
newWrapped
Type
Returns
void
Inherited from
asShape3D()
asShape3D(): Shape3D;
Defined in: shapes.ts:266
Asserts that this shape is a 3D shape (Shell, Solid, CompSolid, or Compound) and returns it typed as Shape3D. Throws if the shape is not 3D.
Useful for chaining after operations that return a generic shape type.
Returns
clone()
clone(): this;
Defined in: shapes.ts:234
Returns
this
delete()
delete(): void;
Defined in: register.ts:54
Returns
void
Inherited from
isEqual()
isEqual(other): boolean;
Defined in: shapes.ts:255
Parameters
other
Returns
boolean
isSame()
isSame(other): boolean;
Defined in: shapes.ts:251
Parameters
other
Returns
boolean
serialize()
serialize(): string;
Defined in: shapes.ts:238
Returns
string
simplify()
simplify(): this;
Defined in: shapes.ts:276
Simplifies the shape by removing unnecessary edges and faces
Returns
this
Shape Export
blobSTEP()
blobSTEP(): Blob;
Defined in: shapes.ts:593
Exports the current shape as a STEP file as a Blob
Returns
Blob
blobSTL()
blobSTL(__namedParameters): Blob;
Defined in: shapes.ts:635
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
__namedParameters
angularTolerance?
number = 0.1
binary?
boolean = false
tolerance?
number = 1e-3
Returns
Blob
mesh()
mesh(__namedParameters): ShapeMesh;
Defined in: shapes.ts:439
Exports the current shape as a set of triangle. These can be used by threejs for instance to represent the the shape
Parameters
__namedParameters
angularTolerance?
number = 0.1
tolerance?
number = 1e-3
Returns
meshEdges()
meshEdges(__namedParameters): object;
Defined in: shapes.ts:476
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
__namedParameters
angularTolerance?
number = 0.1
tolerance?
number = 1e-3
Returns
object
edgeGroups
edgeGroups: object[];
lines
lines: number[];
Shape Transformations
mirror()
mirror(inputPlane?, origin?): this;
Defined in: shapes.ts:368
Mirrors the shape through a plane
Parameters
inputPlane?
origin?
Returns
this
rotate()
rotate(
angle,
position,
direction): this;
Defined in: shapes.ts:349
Rotates the shape
Parameters
angle
number
position
Point = ...
direction
Point = ...
Returns
this
scale()
scale(scale, center): this;
Defined in: shapes.ts:384
Returns a scaled version of the shape
Parameters
scale
number
center
Point = ...
Returns
this
translate()
Call Signature
translate(
xDist,
yDist,
zDist): this;
Defined in: shapes.ts:300
Translates the shape of an arbitrary vector
Parameters
xDist
number
yDist
number
zDist
number
Returns
this
Call Signature
translate(vector): this;
Defined in: shapes.ts:301
Translates the shape of an arbitrary vector
Parameters
vector
Returns
this
translateX()
translateX(distance): this;
Defined in: shapes.ts:322
Translates the shape on the X axis
Parameters
distance
number
Returns
this
translateY()
translateY(distance): this;
Defined in: shapes.ts:331
Translates the shape on the Y axis
Parameters
distance
number
Returns
this
translateZ()
translateZ(distance): this;
Defined in: shapes.ts:340
Translates the shape on the Z axis
Parameters
distance
number
Returns
this