[mxcad_3d API Document](../README. md)/Mx3dGeEclipse
Class: Mx3dGeEllipse 
Represents an elliptical object in three-dimensional space, inherited from the Mx3dGeObject class. Supports constructing ellipses with different parameters and provides rich attribute access and operation methods.
Hierarchy 
- ↳ - Mx3dGeEllipse
Table of contents 
Constructors 
Methods 
- Area
- Axis
- Directrix1
- Directrix2
- Eccentricity
- Focal
- Focus1
- Focus2
- Location
- MajorRadius
- MinorRadius
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Parameter
- Position
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetLocation
- SetMajorRadius
- SetMinorRadius
- SetPosition
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- XAxis
- YAxis
Constructors 
constructor 
• new Mx3dGeEllipse()
Construct an uninitialized instance of an ellipse.
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeEllipse(theA2, theMajorRadius, theMinorRadius)
Construct an ellipse based on the given coordinate system and radius.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | The coordinate system where the ellipse is located | 
| theMajorRadius | number | Main radius | 
| The MinorRadius | Number | Sub radius | 
Overrides 
Mx3dGeObject.constructor
Methods 
Area 
▸ Area(): number
Calculate and return the area of an ellipse.
Returns 
number
The area of an ellipse
Axis 
▸ Axis(): Mx3dGeAxis
Return the axis of the ellipse.
Returns 
The axis of an ellipse
Directrix1 
▸ Directrix1(): Mx3dGeAxis
The first direct line of the ellipse is a straight line perpendicular to the main axis, located on the ellipse and satisfying a specific geometric relationship.
Returns 
Line 1
Directrix2 
▸ Directrix2(): Mx3dGeAxis
The second direct line of the ellipse is a straight line perpendicular to the main axis, located on the ellipse and satisfying a specific geometric relationship.
Returns 
Line 2
Eccentricity 
▸ Eccentricity(): number
Calculate and return the eccentricity of the ellipse, which is the ratio of the focal length to the semi major axis.
Returns 
number
Eccentricity
Focal 
▸ Focal(): number
Calculate and return the focal length of the ellipse and the distance between the two focal points.
Returns 
number
focal length
Focus1 
▸ Focus1(): Mx3dGePoint
Obtain the first focal point of the ellipse.
Returns 
First Focus
Focus2 
▸ Focus2(): Mx3dGePoint
Obtain the second focal point of the ellipse.
Returns 
Two focal points
Location 
▸ Location(): Mx3dGePoint
Get the current position of the ellipse, which is the center point.
Returns 
current location
MajorRadius 
▸ MajorRadius(): number
Obtain the principal radius of the ellipse.
Returns 
number
Main radius
MinorRadius 
▸ MinorRadius(): number
Obtain the secondary radius of the ellipse.
Returns 
number
Secondary radius
MirrorByAxis 
▸ MirrorByAxis(theA1): void
Mirror the ellipse to specify the axis of symmetry.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis of mirror operation | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(theA2): void
Perform a mirror operation on an ellipse to specify the plane of the coordinate system as the symmetry plane.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Coordinate system for mirror operation | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(theP): void
Perform a mirror operation on the ellipse and perform a symmetric transformation around a specified point as the center.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | The center point of the mirror operation | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(theA1): Mx3dGeEllipse
Return the elliptical copy mirrored along the specified axis.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis of mirror operation | 
Returns 
Mirrored elliptical copy
MirroredByCSYSR 
▸ MirroredByCSYSR(theA2): Mx3dGeEllipse
Returns a copy of the ellipse mirrored along the plane of the specified coordinate system.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Coordinate system for mirror operation | 
Returns 
Mirrored elliptical copy
MirroredByPoint 
▸ MirroredByPoint(theP): Mx3dGeEllipse
Return the elliptical copy mirrored along the specified point.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | The center point of the mirror operation | 
Returns 
Mirrored elliptical copy
Parameter 
▸ Parameter(): number
Obtaining the parameters of an ellipse may refer to the parameters in the parameter equation corresponding to a point on the ellipse.
Returns 
number
Parameter values
Position 
▸ Position(): Mx3dGeCSYSR
Obtain the position coordinate system of the ellipse and define the coordinate framework where the ellipse is located.
Returns 
Position coordinate system
Rotate 
▸ Rotate(theA1, theAng): void
Rotate an ellipse and perform a rotation operation around a specified axis at a given angle.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis | 
| TheAng | number | Rotation angle (radians) | 
Returns 
void
Rotated 
▸ Rotated(theA1, theAng): Mx3dGeEllipse
Return the rotated elliptical copy.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis | 
| TheAng | number | Rotation angle (radians) | 
Returns 
Rotating elliptical copy
Scale 
▸ Scale(theP, theS): void
Scaling an ellipse, starting from a specified point and scaling according to a given ratio.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point | 
| TheS | number | scaling ratio | 
Returns 
void
Scaled 
▸ Scaled(theP, theS): Mx3dGeEllipse
Return the scaled copy of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point | 
| TheS | number | scaling ratio | 
Returns 
Scaling the elliptical copy
SetAxis 
▸ SetAxis(theA1): void
Set the axis of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | New axis | 
Returns 
void
SetLocation 
▸ SetLocation(theP): void
Set the position of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP | [Mx3dGePoint] (Mx3dGePoint. md) | New location point | 
Returns 
void
SetMajorRadius 
▸ SetMajorRadius(theMajorRadius): void
Set the main radius of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| theMajorRadius | number | New main radius | 
Returns 
void
SetMinorRadius 
▸ SetMinorRadius(theMinorRadius): void
Set the secondary radius of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheMinorRadius | Number | New sub radius | 
Returns 
void
SetPosition 
▸ SetPosition(theA2): void
Set the coordinate system of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | New coordinate system | 
Returns 
void
Transform 
▸ Transform(theT): void
Transform ellipses using transformation matrices.
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | [ Mx3dGeTsf] (Mx3dGeTsf. md) | Transformation Matrix | 
Returns 
void
Transformed 
▸ Transformed(theT): Mx3dGeEllipse
Return the transformed copy of the ellipse.
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | [ Mx3dGeTsf] (Mx3dGeTsf. md) | Transformation Matrix | 
Returns 
The transformed elliptical copy
TranslateBy2Points 
▸ TranslateBy2Points(theP1, theP2): void
Elliptical distance translation refers to the movement of an ellipse from one point to another.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting Point | 
| TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(theV): void
Translate along the specified vector along the circle.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(theP1, theP2): Mx3dGeEllipse
Return the elliptical copy after equidistant translation.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting Point | 
| TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint | 
Returns 
Translated elliptical copy
TranslatedByVec 
▸ TranslatedByVec(theV): Mx3dGeEllipse
Return the translated elliptical copy.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector | 
Returns 
Translated elliptical copy
XAxis 
▸ XAxis(): Mx3dGeAxis
Obtain the main axis of the ellipse, which is the axis along the main radius direction.
Returns 
The main axis of an ellipse
YAxis 
▸ YAxis(): Mx3dGeAxis
Obtain the minor axis of the ellipse, which is the axis along the minor radius direction.
Returns 
The secondary axis of an ellipse