Skip to content

[mxcad_3d API documentation](../README. md)/Mx3dShapeSolid

Class: Mx3dShapeSolid

Solid shaped object

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dShapeSolid(p?)

Parameters

NameType
p?object

Overrides

Mx3dShapeObject.constructor

Methods

Centroid

Centroid(theAspect): Mx3dGePoint

Obtain the centroid of the shape.

Parameters

NameTypeDescription
The centroid type that needs to be set based on the shape type is MxQuantAspect (../ennus/MdGe. MxQuantAspect. md)

Returns

Mx3dGePoint

Center of mass point.

Inherited from

Mx3dShapeObject.Centroid


Explore

Explore(ToFind): Mx3dShapeObject[]

Traverse shape objects.

Parameters

NameTypeDescription
ToFind[MxShapeenum] (../enums/MdGe. MxShapeenum. md)The type of shape to search for

Returns

Mx3dShapeObject[]

Shape object array.

Inherited from

Mx3dShapeObject.Explore


MirrorByAxis

MirrorByAxis(axis): void

Mirror the current shape object based on an axis.

Parameters

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

void

Inherited from

Mx3dShapeObject.MirrorByAxis


MirrorByCSYSR

MirrorByCSYSR(csysr): void

Mirror the current shape object based on a coordinate system.

Parameters

NameTypeDescription
Csysr[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Mirror coordinate system

Returns

void

Inherited from

Mx3dShapeObject.MirrorByCSYSR


MirrorByPoint

MirrorByPoint(theP): void

Mirror the current shape object based on a point.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

void

Inherited from

Mx3dShapeObject.MirrorByPoint


MirroredByAxis

MirroredByAxis(axis): Mx3dShapeObject

Return the shape object mirrored based on an axis.

Parameters

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

Mx3dShapeObject

The mirrored shape object.

Inherited from

Mx3dShapeObject.MirroredByAxis


MirroredByCSYSR

MirroredByCSYSR(csysr): Mx3dShapeObject

Return the shape object mirrored based on a coordinate system.

Parameters

NameTypeDescription
Csysr[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Mirror coordinate system

Returns

Mx3dShapeObject

The mirrored shape object.

Inherited from

Mx3dShapeObject.MirroredByCSYSR


MirroredByPoint

MirroredByPoint(theP): Mx3dShapeObject

Returns a shape object that has been mirrored based on a point.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

Mx3dShapeObject

The mirrored shape object.

Inherited from

Mx3dShapeObject.MirroredByPoint


Orientation

Orientation(): MxOrientation

Obtain the orientation of the shape

Returns

MxOrientation

orientation

Inherited from

Mx3dShapeObject.Orientation


Quantities

Quantities(theAspect): number

Obtain the length, area, volume, etc. of the shape.

Parameters

NameTypeDescription
The Aspect[MxQuantAspect] (../ennus/MdGe. MxQuantAspect. md)Set whether to obtain length, area, or volume

Returns

number

Quantity value.

Inherited from

Mx3dShapeObject.Quantities


Rotate

Rotate(axis, ang): void

Rotate the current shape object.

Parameters

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
'ang''number'Rotation angle

Returns

void

Inherited from

Mx3dShapeObject.Rotate


Rotated

Rotated(axis, ang): Mx3dShapeObject

Return the rotated shape object.

Parameters

NameTypeDescription
Axis[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
'ang''number'Rotation angle

Returns

Mx3dShapeObject

The rotated shape object.

Inherited from

Mx3dShapeObject.Rotated


Scale

Scale(point, s): void

Scale the current shape object.

Parameters

NameTypeDescription
Point[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
Snumberscaling ratio

Returns

void

Inherited from

Mx3dShapeObject.Scale


Scaled

Scaled(point, s): Mx3dShapeObject

Return the scaled shape object.

Parameters

NameTypeDescription
Point[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
Snumberscaling ratio

Returns

Mx3dShapeObject

The scaled shape object.

Inherited from

Mx3dShapeObject.Scaled


ShapeType

ShapeType(): MxShapeEnum

Get the shape type.

Returns

MxShapeEnum

Shape type.

Inherited from

Mx3dShapeObject.ShapeType


Transform

Transform(trsf): void

Transform the current shape object based on the transformation matrix.

Parameters

NameTypeDescription
Trsf[Mx3dGetTrsf] (Mx3dGetTrsf. md)Transform matrix

Returns

void

Inherited from

Mx3dShapeObject.Transform


Transformed

Transformed(trsf): Mx3dShapeObject

Return the shape object transformed according to the transformation matrix.

Parameters

NameTypeDescription
Trsf[Mx3dGetTrsf] (Mx3dGetTrsf. md)Transform matrix

Returns

Mx3dShapeObject

The transformed shape object.

Inherited from

Mx3dShapeObject.Transformed


TranslateBy2Points

TranslateBy2Points(point1, point2): void

Translate the current shape object based on two points.

Parameters

NameTypeDescription
Point1[Mx3dGePoint] (Mx3dGePoint. md)Starting point
Point2[Mx3dGePoint] (Mx3dGePoint. md)Endpoint

Returns

void

Inherited from

Mx3dShapeObject.TranslateBy2Points


TranslateByVec

TranslateByVec(vec): void

Translate the current shape object based on the vector.

Parameters

NameTypeDescription
Vec[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

void

Inherited from

Mx3dShapeObject.TranslateByVec

TranslateByVec(theX, theY, theZ): void

Translate the current shape object based on its coordinates.

Parameters

NameTypeDescription
TheXnumberX coordinate
TheYNumberY coordinate
TheZNumberZ coordinate

Returns

void

Inherited from

Mx3dShapeObject.TranslateByVec


TranslatedBy2Points

TranslatedBy2Points(point1, point2): Mx3dShapeObject

Return the shape object that has been translated based on two points.

Parameters

NameTypeDescription
Point1[Mx3dGePoint] (Mx3dGePoint. md)Starting point
Point2[Mx3dGePoint] (Mx3dGePoint. md)Endpoint

Returns

Mx3dShapeObject

The shape object after translation.

Inherited from

Mx3dShapeObject.TranslatedBy2Points


TranslatedByVec

TranslatedByVec(vec): Mx3dShapeObject

Return the shape object translated based on the vector.

Parameters

NameTypeDescription
Vec[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

Mx3dShapeObject

The shape object after translation.

Inherited from

Mx3dShapeObject.TranslatedByVec

TranslatedByVec(theX, theY, theZ): Mx3dShapeObject

Return the shape object after coordinate translation.

Parameters

NameTypeDescription
TheXnumberX coordinate
TheYNumberY coordinate
TheZNumberZ coordinate

Returns

Mx3dShapeObject

The shape object after translation.

Inherited from

Mx3dShapeObject.TranslatedByVec


clone

clone(): Mx3dShapeObject

Clone the current shape object.

Returns

Mx3dShapeObject

The cloned shape object.

Inherited from

Mx3dShapeObject.clone


common

common(theOther): Mx3dShapeObject

Return the common part between the current shape object and another shape object.

Parameters

NameTypeDescription
theOther[Mx3dShapeObject] (Mx3dShapeObject. md)Another shape object

Returns

Mx3dShapeObject

The shape object of the public part.

Inherited from

Mx3dShapeObject.common


cut

cut(theOther): Mx3dShapeObject

Subtract another shape object from the current shape object.

Parameters

NameTypeDescription
theOther[Mx3dShapeObject] (Mx3dShapeObject. md)Another shape object

Returns

Mx3dShapeObject

The reduced shape object.

Inherited from

Mx3dShapeObject.cut


fuse

fuse(theOther): Mx3dShapeObject

Merge with another shape object.

Parameters

NameTypeDescription
theOther[Mx3dShapeObject] (Mx3dShapeObject. md)Another shape object

Returns

Mx3dShapeObject

The fused shape object.

Inherited from

Mx3dShapeObject.fuse


getBndBox

getBndBox(): Mx3dGeBndBox

Get the bounding box of the shape object.

Returns

Mx3dGeBndBox

Boundary box object.

Inherited from

Mx3dShapeObject.getBndBox


move

move(theLocation): void

Move the shape object to the specified position.

Parameters

NameTypeDescription
TheLocation[Mx3dGeLocation. md]The location of the movement

Returns

void

Inherited from

Mx3dShapeObject.move


moved

moved(theLocation): Mx3dShapeObject

Return the shape object after movement.

Parameters

NameTypeDescription
TheLocation[Mx3dGeLocation. md]The location of the movement

Returns

Mx3dShapeObject

The shape object after movement.

Inherited from

Mx3dShapeObject.moved


reverse

reverse(): void

Shape reversed

Returns

void

Inherited from

Mx3dShapeObject.reverse


reversed

reversed(): Mx3dShapeObject

Obtain the new shape after reversing

Returns

Mx3dShapeObject

New shape after reversal

Inherited from

Mx3dShapeObject.reversed


section

section(theOther): Mx3dShapeObject

Returns the intersecting contour between the current shape object and another shape object.

Parameters

NameTypeDescription
theOther[Mx3dShapeObject] (Mx3dShapeObject. md)Another shape object

Returns

Mx3dShapeObject

Shape objects with intersecting contours.

Inherited from

Mx3dShapeObject.section


spliter

spliter(theTools): Mx3dShapeObject[]

Use the tool shape object to segment the current shape object.

Parameters

NameTypeDescription
TheTools[Mx3dShapeObject] (Mx3dShapeObject. md) []Tool Shape Object Array

Returns

Mx3dShapeObject[]

The segmented array of shape objects.

Inherited from

Mx3dShapeObject.spliter