[mxcad_3d API Document](../README. md)/Mx3dGeCylinder
Class: Mx3dGeCylinder
Represents a class of cylinders.
Hierarchy
↳
Mx3dGeCylinder
Table of contents
Constructors
Methods
- Axis
- Direct
- Location
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Position
- Radius
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetLocation
- SetPosition
- SetRadius
- Shape
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- UReverse
- VReverse
- XAxis
- YAxis
Constructors
constructor
• new Mx3dGeCylinder()
Create a default cylindrical object.
Overrides
Mx3dGeObject.constructor
• new Mx3dGeCylinder(theA3
, theRadius
)
Create a cylindrical object using a coordinate system and radius.
Parameters
Name | Type | Description |
---|---|---|
TheA3 | [Mx3dGeCSYS] (Mx3dGeCSYS. md) | Coordinate system |
TheRadius | Number | The radius of a cylinder |
Overrides
Mx3dGeObject.constructor
Methods
Axis
▸ Axis(): Mx3dGeAxis
Obtain the axis of the cylinder.
Returns
The axis of a cylinder.
Direct
▸ Direct(): boolean
Check if the direction of the cylinder is positive.
Returns
boolean
Is it positive.
Location
▸ Location(): Mx3dGePoint
Get the origin position of the cylinder.
Returns
Origin position.
MirrorByAxis
▸ MirrorByAxis(theA1
): void
Mirror the cylinder through an axis.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
void
MirrorByCSYSR
▸ MirrorByCSYSR(theA2
): void
Mirror the cylinder using the right-hand coordinate system.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system |
Returns
void
MirrorByPoint
▸ MirrorByPoint(theP
): void
Mirror a cylinder through a point.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
void
MirroredByAxis
▸ MirroredByAxis(theA1
): Mx3dGeCylinder
Mirror a cylinder through an axis and return the mirrored cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
The mirrored cylindrical object.
MirroredByCSYSR
▸ MirroredByCSYSR(theA2
): Mx3dGeCylinder
Mirror the cylinder using the right-hand coordinate system and return the mirrored cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system |
Returns
The mirrored cylindrical object.
MirroredByPoint
▸ MirroredByPoint(theP
): Mx3dGeCylinder
Mirror a cylinder through a point and return the mirrored cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
The mirrored cylindrical object.
Position
▸ Position(): Mx3dGeCSYS
Get the position of the cylinder.
Returns
The position of the cylinder.
Radius
▸ Radius(): number
Get the radius of the cylinder.
Returns
number
The radius of a cylinder.
Rotate
▸ Rotate(theA1
, theAng
): void
Rotate the cylinder around its axis.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
TheAng | Number | Rotation angle |
Returns
void
Rotated
▸ Rotated(theA1
, theAng
): Mx3dGeCylinder
Rotate the cylinder around its axis and return the rotated cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
TheAng | Number | Rotation angle |
Returns
The rotated cylindrical object.
Scale
▸ Scale(theP
, theS
): void
Scale the cylinder.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
TheS | Number | Scale ratio |
Returns
void
Scaled
▸ Scaled(theP
, theS
): Mx3dGeCylinder
Scale the cylinder and return the scaled cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
TheS | Number | Scale ratio |
Returns
The scaled cylindrical object.
SetAxis
▸ SetAxis(theA1
): void
Set the axis of the cylinder.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis of the cylinder |
Returns
void
SetLocation
▸ SetLocation(theLoc
): void
Set the origin position of the cylinder.
Parameters
Name | Type | Description |
---|---|---|
TheLoc | [Mx3dGePoint] (Mx3dGePoint. md) | Origin position |
Returns
void
SetPosition
▸ SetPosition(theA3
): void
Set the position of the cylinder.
Parameters
Name | Type | Description |
---|---|---|
TheA3 | [Mx3dGeCSYS] (Mx3dGeCSYS. md) | Coordinate system |
Returns
void
SetRadius
▸ SetRadius(theR
): void
Set the radius of the cylinder.
Parameters
Name | Type | Description |
---|---|---|
TheR | Number | The radius of the cylinder |
Returns
void
Shape
▸ Shape(H
, Angle?
): Mx3dShapeObject
Create an Mx3dShapeObject object to represent the shape of a cylinder.
Parameters
Name | Type | Description |
---|---|---|
H | number | The height of the cylinder |
Angle? | Number | Optional parameter, representing the angle of the cylinder |
Returns
Return a new Mx3dShapeObject object representing the shape of a cylinder.
Transform
▸ Transform(theT
): void
Transform the cylinder.
Parameters
Name | Type | Description |
---|---|---|
theT | [Mx3dGeTsf ] (Mx3dGeTsf. md) | Transform matrix |
Returns
void
Transformed
▸ Transformed(theT
): Mx3dGeCylinder
Transform the cylinder and return the transformed cylinder object.
Parameters
Name | Type | Description |
---|---|---|
theT | [Mx3dGeTsf ] (Mx3dGeTsf. md) | Transform matrix |
Returns
The transformed cylindrical object.
TranslateBy2Points
▸ TranslateBy2Points(theP1
, theP2
): void
Translate the position of the cylinder along a straight line between two points.
Parameters
Name | Type | Description |
---|---|---|
TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | The first point used to determine the starting point of translation |
TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | The second point is used to determine the endpoint of the translation |
Returns
void
TranslateByVec
▸ TranslateByVec(theV
): void
Translate the cylinder through a vector.
Parameters
Name | Type | Description |
---|---|---|
TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector |
Returns
void
TranslatedBy2Points
▸ TranslatedBy2Points(theP1
, theP2
): Mx3dGeCylinder
Create a new cylindrical object and translate its position along a line between two points.
Parameters
Name | Type | Description |
---|---|---|
TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | The first point used to determine the starting point of translation |
TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | The second point is used to determine the endpoint of the translation |
Returns
Return a new Mx3dGeCylinder object, the translated cylinder.
TranslatedByVec
▸ TranslatedByVec(theV
): Mx3dGeCylinder
Translate the cylinder through a vector and return the translated cylinder object.
Parameters
Name | Type | Description |
---|---|---|
TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector |
Returns
Translated cylindrical object.
UReverse
▸ UReverse(): void
Reverse the U-parameter direction of the cylinder.
Returns
void
VReverse
▸ VReverse(): void
Reverse the V-parameter direction of the cylinder.
Returns
void
XAxis
▸ XAxis(): Mx3dGeAxis
Obtain the X-axis of the cylinder.
Returns
X-axis.
YAxis
▸ YAxis(): Mx3dGeAxis
Obtain the Y-axis of the cylinder.
Returns
Y-axis.