Skip to content

[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 ​

Table of contents ​

Constructors ​

Methods ​

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 ​

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)The coordinate system where the ellipse is located
theMajorRadiusnumberMain radius
The MinorRadiusNumberSub 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 ​

Mx3dGeAxis

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 ​

Mx3dGeAxis

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 ​

Mx3dGeAxis

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 ​

Mx3dGePoint

First Focus


Focus2 ​

▸ Focus2(): Mx3dGePoint

Obtain the second focal point of the ellipse.

Returns ​

Mx3dGePoint

Two focal points


Location ​

▸ Location(): Mx3dGePoint

Get the current position of the ellipse, which is the center point.

Returns ​

Mx3dGePoint

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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis of mirror operation

Returns ​

Mx3dGeEllipse

Mirrored elliptical copy


MirroredByCSYSR ​

▸ MirroredByCSYSR(theA2): Mx3dGeEllipse

Returns a copy of the ellipse mirrored along the plane of the specified coordinate system.

Parameters ​

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Coordinate system for mirror operation

Returns ​

Mx3dGeEllipse

Mirrored elliptical copy


MirroredByPoint ​

▸ MirroredByPoint(theP): Mx3dGeEllipse

Return the elliptical copy mirrored along the specified point.

Parameters ​

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)The center point of the mirror operation

Returns ​

Mx3dGeEllipse

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 ​

Mx3dGeCSYSR

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 ​

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngnumberRotation angle (radians)

Returns ​

void


Rotated ​

▸ Rotated(theA1, theAng): Mx3dGeEllipse

Return the rotated elliptical copy.

Parameters ​

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngnumberRotation angle (radians)

Returns ​

Mx3dGeEllipse

Rotating elliptical copy


Scale ​

▸ Scale(theP, theS): void

Scaling an ellipse, starting from a specified point and scaling according to a given ratio.

Parameters ​

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
TheSnumberscaling ratio

Returns ​

void


Scaled ​

▸ Scaled(theP, theS): Mx3dGeEllipse

Return the scaled copy of the ellipse.

Parameters ​

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
TheSnumberscaling ratio

Returns ​

Mx3dGeEllipse

Scaling the elliptical copy


SetAxis ​

▸ SetAxis(theA1): void

Set the axis of the ellipse.

Parameters ​

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)New axis

Returns ​

void


SetLocation ​

▸ SetLocation(theP): void

Set the position of the ellipse.

Parameters ​

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)New location point

Returns ​

void


SetMajorRadius ​

▸ SetMajorRadius(theMajorRadius): void

Set the main radius of the ellipse.

Parameters ​

NameTypeDescription
theMajorRadiusnumberNew main radius

Returns ​

void


SetMinorRadius ​

▸ SetMinorRadius(theMinorRadius): void

Set the secondary radius of the ellipse.

Parameters ​

NameTypeDescription
TheMinorRadiusNumberNew sub radius

Returns ​

void


SetPosition ​

▸ SetPosition(theA2): void

Set the coordinate system of the ellipse.

Parameters ​

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)New coordinate system

Returns ​

void


Transform ​

▸ Transform(theT): void

Transform ellipses using transformation matrices.

Parameters ​

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transformation Matrix

Returns ​

void


Transformed ​

▸ Transformed(theT): Mx3dGeEllipse

Return the transformed copy of the ellipse.

Parameters ​

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transformation Matrix

Returns ​

Mx3dGeEllipse

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 ​

NameTypeDescription
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 ​

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

Returns ​

void


TranslatedBy2Points ​

▸ TranslatedBy2Points(theP1, theP2): Mx3dGeEllipse

Return the elliptical copy after equidistant translation.

Parameters ​

NameTypeDescription
TheP1[Mx3dGePoint] (Mx3dGePoint. md)Starting Point
TheP2[Mx3dGePoint] (Mx3dGePoint. md)Endpoint

Returns ​

Mx3dGeEllipse

Translated elliptical copy


TranslatedByVec ​

▸ TranslatedByVec(theV): Mx3dGeEllipse

Return the translated elliptical copy.

Parameters ​

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

Returns ​

Mx3dGeEllipse

Translated elliptical copy


XAxis ​

▸ XAxis(): Mx3dGeAxis

Obtain the main axis of the ellipse, which is the axis along the main radius direction.

Returns ​

Mx3dGeAxis

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 ​

Mx3dGeAxis

The secondary axis of an ellipse