[mxcad_3d API Document](../README. md)/Mx3dShapeCompSolid
Class: Mx3dShapeCompSolid
Composite solid entity object, composed of solid entities
Hierarchy
↳
Mx3dShapeCompSolid
Table of contents
Constructors
Methods
- Centroid
- Explore
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Orientation
- Quantities
- Rotate
- Rotated
- Scale
- Scaled
- ShapeType
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- clone
- common
- cut
- fuse
- getBndBox
- move
- moved
- reverse
- reversed
- section
- spliter
Constructors
constructor
• new Mx3dShapeCompSolid(p?)
Parameters
| Name | Type |
|---|---|
p? | object |
Overrides
Methods
Centroid
▸ Centroid(theAspect): Mx3dGePoint
Obtain the centroid of the shape.
Parameters
| Name | Type | Description |
|---|---|---|
| The centroid type that needs to be set based on the shape type is MxQuantAspect (../ennus/MdGe. MxQuantAspect. md) |
Returns
Center of mass point.
Inherited from
Explore
▸ Explore(ToFind): Mx3dShapeObject[]
Traverse shape objects.
Parameters
| Name | Type | Description |
|---|---|---|
| ToFind | [MxShapeenum] (../enums/MdGe. MxShapeenum. md) | The type of shape to search for |
Returns
Shape object array.
Inherited from
MirrorByAxis
▸ MirrorByAxis(axis): void
Mirror the current shape object based on an axis.
Parameters
| Name | Type | Description |
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
void
Inherited from
MirrorByCSYSR
▸ MirrorByCSYSR(csysr): void
Mirror the current shape object based on a coordinate system.
Parameters
| Name | Type | Description |
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Mirror coordinate system |
Returns
void
Inherited from
MirrorByPoint
▸ MirrorByPoint(theP): void
Mirror the current shape object based on a point.
Parameters
| Name | Type | Description |
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
void
Inherited from
MirroredByAxis
▸ MirroredByAxis(axis): Mx3dShapeObject
Return the shape object mirrored based on an axis.
Parameters
| Name | Type | Description |
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
The mirrored shape object.
Inherited from
Mx3dShapeObject.MirroredByAxis
MirroredByCSYSR
▸ MirroredByCSYSR(csysr): Mx3dShapeObject
Return the shape object mirrored based on a coordinate system.
Parameters
| Name | Type | Description |
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Mirror coordinate system |
Returns
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
| Name | Type | Description |
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
The mirrored shape object.
Inherited from
Mx3dShapeObject.MirroredByPoint
Orientation
▸ Orientation(): MxOrientation
Obtain the orientation of the shape
Returns
orientation
Inherited from
Quantities
▸ Quantities(theAspect): number
Obtain the length, area, volume, etc. of the shape.
Parameters
| Name | Type | Description |
|---|---|---|
| The Aspect | [MxQuantAspect] (../ennus/MdGe. MxQuantAspect. md) | Set whether to obtain length, area, or volume |
Returns
number
Quantity value.
Inherited from
Rotate
▸ Rotate(axis, ang): void
Rotate the current shape object.
Parameters
| Name | Type | Description |
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
| 'ang' | 'number' | Rotation angle |
Returns
void
Inherited from
Rotated
▸ Rotated(axis, ang): Mx3dShapeObject
Return the rotated shape object.
Parameters
| Name | Type | Description |
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
| 'ang' | 'number' | Rotation angle |
Returns
The rotated shape object.
Inherited from
Scale
▸ Scale(point, s): void
Scale the current shape object.
Parameters
| Name | Type | Description |
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
| S | number | scaling ratio |
Returns
void
Inherited from
Scaled
▸ Scaled(point, s): Mx3dShapeObject
Return the scaled shape object.
Parameters
| Name | Type | Description |
|---|---|---|
| Point | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
| S | number | scaling ratio |
Returns
The scaled shape object.
Inherited from
ShapeType
▸ ShapeType(): MxShapeEnum
Get the shape type.
Returns
Shape type.
Inherited from
Transform
▸ Transform(trsf): void
Transform the current shape object based on the transformation matrix.
Parameters
| Name | Type | Description |
|---|---|---|
| Trsf | [Mx3dGetTrsf] (Mx3dGetTrsf. md) | Transform matrix |
Returns
void
Inherited from
Transformed
▸ Transformed(trsf): Mx3dShapeObject
Return the shape object transformed according to the transformation matrix.
Parameters
| Name | Type | Description |
|---|---|---|
| Trsf | [Mx3dGetTrsf] (Mx3dGetTrsf. md) | Transform matrix |
Returns
The transformed shape object.
Inherited from
TranslateBy2Points
▸ TranslateBy2Points(point1, point2): void
Translate the current shape object based on two points.
Parameters
| Name | Type | Description |
|---|---|---|
| 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
| Name | Type | Description |
|---|---|---|
| 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
| Name | Type | Description |
|---|---|---|
| TheX | number | X coordinate |
| TheY | Number | Y coordinate |
| TheZ | Number | Z 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
| Name | Type | Description |
|---|---|---|
| Point1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point |
| Point2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint |
Returns
The shape object after translation.
Inherited from
Mx3dShapeObject.TranslatedBy2Points
TranslatedByVec
▸ TranslatedByVec(vec): Mx3dShapeObject
Return the shape object translated based on the vector.
Parameters
| Name | Type | Description |
|---|---|---|
| Vec | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector |
Returns
The shape object after translation.
Inherited from
Mx3dShapeObject.TranslatedByVec
▸ TranslatedByVec(theX, theY, theZ): Mx3dShapeObject
Return the shape object after coordinate translation.
Parameters
| Name | Type | Description |
|---|---|---|
| TheX | number | X coordinate |
| TheY | Number | Y coordinate |
| TheZ | Number | Z coordinate |
Returns
The shape object after translation.
Inherited from
Mx3dShapeObject.TranslatedByVec
clone
▸ clone(): Mx3dShapeObject
Clone the current shape object.
Returns
The cloned shape object.
Inherited from
common
▸ common(theOther): Mx3dShapeObject
Return the common part between the current shape object and another shape object.
Parameters
| Name | Type | Description |
|---|---|---|
theOther | [Mx3dShapeObject] (Mx3dShapeObject. md) | Another shape object |
Returns
The shape object of the public part.
Inherited from
cut
▸ cut(theOther): Mx3dShapeObject
Subtract another shape object from the current shape object.
Parameters
| Name | Type | Description |
|---|---|---|
theOther | [Mx3dShapeObject] (Mx3dShapeObject. md) | Another shape object |
Returns
The reduced shape object.
Inherited from
fuse
▸ fuse(theOther): Mx3dShapeObject
Merge with another shape object.
Parameters
| Name | Type | Description |
|---|---|---|
theOther | [Mx3dShapeObject] (Mx3dShapeObject. md) | Another shape object |
Returns
The fused shape object.
Inherited from
getBndBox
▸ getBndBox(): Mx3dGeBndBox
Get the bounding box of the shape object.
Returns
Boundary box object.
Inherited from
move
▸ move(theLocation): void
Move the shape object to the specified position.
Parameters
| Name | Type | Description |
|---|---|---|
| TheLocation | [Mx3dGeLocation. md] | The location of the movement |
Returns
void
Inherited from
moved
▸ moved(theLocation): Mx3dShapeObject
Return the shape object after movement.
Parameters
| Name | Type | Description |
|---|---|---|
| TheLocation | [Mx3dGeLocation. md] | The location of the movement |
Returns
The shape object after movement.
Inherited from
reverse
▸ reverse(): void
Shape reversed
Returns
void
Inherited from
reversed
▸ reversed(): Mx3dShapeObject
Obtain the new shape after reversing
Returns
New shape after reversal
Inherited from
section
▸ section(theOther): Mx3dShapeObject
Returns the intersecting contour between the current shape object and another shape object.
Parameters
| Name | Type | Description |
|---|---|---|
theOther | [Mx3dShapeObject] (Mx3dShapeObject. md) | Another shape object |
Returns
Shape objects with intersecting contours.
Inherited from
spliter
▸ spliter(theTools): Mx3dShapeObject[]
Use the tool shape object to segment the current shape object.
Parameters
| Name | Type | Description |
|---|---|---|
| TheTools | [Mx3dShapeObject] (Mx3dShapeObject. md) [] | Tool Shape Object Array |
Returns
The segmented array of shape objects.