Shape<Type>
Type parameters
Name | Type |
---|---|
Type | extends TopoDS_Shape |
Hierarchy
WrappingObj
<Type
>↳
Shape
↳↳
Vertex
↳↳
_1DShape
↳↳
Face
↳↳
_3DShape
Constructors
constructor
• new Shape<Type
>(ocShape
)
Type parameters
Name | Type |
---|---|
Type | extends TopoDS_Shape |
Parameters
Name | Type |
---|---|
ocShape | Type |
Overrides
Defined in
Accessors
boundingBox
• get
boundingBox(): BoundingBox
Returns
Defined in
edges
• get
edges(): Edge
[]
Returns
Edge
[]
Defined in
faces
• get
faces(): Face
[]
Returns
Face
[]
Defined in
hashCode
• get
hashCode(): number
Returns
number
Defined in
isNull
• get
isNull(): boolean
Returns
boolean
Defined in
wires
• get
wires(): Wire
[]
Returns
Wire
[]
Defined in
wrapped
• get
wrapped(): Type
Returns
Type
Inherited from
WrappingObj.wrapped
Defined in
• set
wrapped(newWrapped
): void
Parameters
Name | Type |
---|---|
newWrapped | Type |
Returns
void
Inherited from
WrappingObj.wrapped
Defined in
Other Methods
clone
▸ clone(): Shape
<Type
>
Returns
Shape
<Type
>
Defined in
delete
▸ delete(): void
Returns
void
Inherited from
Defined in
isEqual
▸ isEqual(other
): boolean
Parameters
Name | Type |
---|---|
other | AnyShape |
Returns
boolean
Defined in
isSame
▸ isSame(other
): boolean
Parameters
Name | Type |
---|---|
other | AnyShape |
Returns
boolean
Defined in
simplify
▸ simplify(): Shape
<Type
>
Simplifies the shape by removing unnecessary edges and faces
Returns
Shape
<Type
>
Defined in
Shape Export Methods
blobSTEP
▸ blobSTEP(): Blob
Exports the current shape as a STEP file as a Blob
Returns
Blob
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
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
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 [] |
Defined in
Shape Transformations Methods
mirror
▸ mirror(inputPlane
, origin
): Shape
<Type
>
Mirrors the shape through a plane
Parameters
Name | Type |
---|---|
inputPlane | Point | Plane | PlaneName |
origin | Point |
Returns
Shape
<Type
>
Defined in
rotate
▸ rotate(angle
, position?
, direction?
): Shape
<Type
>
Rotates the shape
Parameters
Name | Type |
---|---|
angle | number |
position | Point |
direction | Point |
Returns
Shape
<Type
>
Defined in
scale
▸ scale(scale
, center?
): Shape
<Type
>
Returns a scaled version of the shape
Parameters
Name | Type |
---|---|
scale | number |
center | Point |
Returns
Shape
<Type
>
Defined in
translate
▸ translate(xDist
, yDist
, zDist
): Shape
<Type
>
Translates the shape of an arbitrary vector
Parameters
Name | Type |
---|---|
xDist | number |
yDist | number |
zDist | number |
Returns
Shape
<Type
>
Defined in
▸ translate(vector
): Shape
<Type
>
Parameters
Name | Type |
---|---|
vector | Point |
Returns
Shape
<Type
>
Defined in
translateX
▸ translateX(distance
): Shape
<Type
>
Translates the shape on the X axis
Parameters
Name | Type |
---|---|
distance | number |
Returns
Shape
<Type
>
Defined in
translateY
▸ translateY(distance
): Shape
<Type
>
Translates the shape on the Y axis
Parameters
Name | Type |
---|---|
distance | number |
Returns
Shape
<Type
>
Defined in
translateZ
▸ translateZ(distance
): Shape
<Type
>
Translates the shape on the Z axis
Parameters
Name | Type |
---|---|
distance | number |
Returns
Shape
<Type
>