Skip to content

mxcad_3d API 文档 / Mx3dGeEllipse

Class: Mx3dGeEllipse ​

表示三维空间中的椭圆对象,继承自Mx3dGeObject类。 支持通过不同参数构造椭圆,并提供了丰富的属性访问与操作方法。

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

Constructors ​

constructor ​

• new Mx3dGeEllipse()

构造一个未初始化的椭圆实例。

Overrides ​

Mx3dGeObject.constructor

• new Mx3dGeEllipse(theA2, theMajorRadius, theMinorRadius)

根据给定的坐标系和半径构造椭圆。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR椭圆所在的坐标系
theMajorRadiusnumber主半径
theMinorRadiusnumber次半径

Overrides ​

Mx3dGeObject.constructor

Methods ​

Area ​

▸ Area(): number

计算并返回椭圆的面积。

Returns ​

number

椭圆的面积


Axis ​

▸ Axis(): Mx3dGeAxis

返回椭圆的轴。

Returns ​

Mx3dGeAxis

椭圆的轴


Directrix1 ​

▸ Directrix1(): Mx3dGeAxis

获取椭圆的第一条直接线,是垂直于主轴的直线,位于椭圆上,满足特定几何关系。

Returns ​

Mx3dGeAxis

直线1


Directrix2 ​

▸ Directrix2(): Mx3dGeAxis

获取椭圆的第二条直接线,是垂直于主轴的直线,位于椭圆上,满足特定几何关系。

Returns ​

Mx3dGeAxis

直线2


Eccentricity ​

▸ Eccentricity(): number

计算并返回椭圆的离心率,即焦距与半长轴之比。

Returns ​

number

离心率


Focal ​

▸ Focal(): number

计算并返回椭圆的焦距,两焦点之间的距离。

Returns ​

number

焦距


Focus1 ​

▸ Focus1(): Mx3dGePoint

获取椭圆的第一个焦点。

Returns ​

Mx3dGePoint

第一焦点


Focus2 ​

▸ Focus2(): Mx3dGePoint

获取椭圆的第二个焦点。

Returns ​

Mx3dGePoint

二焦点


Location ​

▸ Location(): Mx3dGePoint

获取椭圆的当前位置,即中心点。

Returns ​

Mx3dGePoint

当前位置


MajorRadius ​

▸ MajorRadius(): number

获取椭圆的主半径。

Returns ​

number

主半径


MinorRadius ​

▸ MinorRadius(): number

获取椭圆的次半径。

Returns ​

number

次半径


MirrorByAxis ​

▸ MirrorByAxis(theA1): void

对椭圆执行镜像操作,以指定轴为对称轴。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis镜像操作的轴

Returns ​

void


MirrorByCSYSR ​

▸ MirrorByCSYSR(theA2): void

对椭圆执行镜像操作,以指定坐标系所在的平面为对称面。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR镜像操作的坐标系

Returns ​

void


MirrorByPoint ​

▸ MirrorByPoint(theP): void

对椭圆执行镜像操作,以指定点为中心进行对称变换。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像操作的中心点

Returns ​

void


MirroredByAxis ​

▸ MirroredByAxis(theA1): Mx3dGeEllipse

返回沿指定轴镜像后的椭圆副本。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis镜像操作的轴

Returns ​

Mx3dGeEllipse

镜像后的椭圆副本


MirroredByCSYSR ​

▸ MirroredByCSYSR(theA2): Mx3dGeEllipse

返回沿指定坐标系所在平面镜像后的椭圆副本。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR镜像操作的坐标系

Returns ​

Mx3dGeEllipse

镜像后的椭圆副本


MirroredByPoint ​

▸ MirroredByPoint(theP): Mx3dGeEllipse

返回沿指定点镜像后的椭圆副本。

Parameters ​

NameTypeDescription
thePMx3dGePoint镜像操作的中心点

Returns ​

Mx3dGeEllipse

镜像后的椭圆副本


Parameter ​

▸ Parameter(): number

获取椭圆的参数,可能指椭圆上某点对应的参数方程中的参数。

Returns ​

number

参数值


Position ​

▸ Position(): Mx3dGeCSYSR

获取椭圆的位置坐标系,定义椭圆所在的坐标框架。

Returns ​

Mx3dGeCSYSR

位置坐标系


Rotate ​

▸ Rotate(theA1, theAng): void

旋转椭圆,围绕指定轴按给定角度执行旋转操作。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis旋转轴
theAngnumber旋转角度(弧度)

Returns ​

void


Rotated ​

▸ Rotated(theA1, theAng): Mx3dGeEllipse

返回旋转后的椭圆副本。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis旋转轴
theAngnumber旋转角度(弧度)

Returns ​

Mx3dGeEllipse

旋转后的椭圆副本


Scale ​

▸ Scale(theP, theS): void

缩放椭圆,从指定点出发按给定比例缩放。

Parameters ​

NameTypeDescription
thePMx3dGePoint缩放中心点
theSnumber缩放比例

Returns ​

void


Scaled ​

▸ Scaled(theP, theS): Mx3dGeEllipse

返回缩放后的椭圆副本。

Parameters ​

NameTypeDescription
thePMx3dGePoint缩放中心点
theSnumber缩放比例

Returns ​

Mx3dGeEllipse

缩放后的椭圆副本


SetAxis ​

▸ SetAxis(theA1): void

设置椭圆的轴。

Parameters ​

NameTypeDescription
theA1Mx3dGeAxis新的轴

Returns ​

void


SetLocation ​

▸ SetLocation(theP): void

设置椭圆的位置。

Parameters ​

NameTypeDescription
thePMx3dGePoint新的位置点

Returns ​

void


SetMajorRadius ​

▸ SetMajorRadius(theMajorRadius): void

设置椭圆的主半径。

Parameters ​

NameTypeDescription
theMajorRadiusnumber新的主半径

Returns ​

void


SetMinorRadius ​

▸ SetMinorRadius(theMinorRadius): void

设置椭圆的次半径。

Parameters ​

NameTypeDescription
theMinorRadiusnumber新的次半径

Returns ​

void


SetPosition ​

▸ SetPosition(theA2): void

设置椭圆的坐标系。

Parameters ​

NameTypeDescription
theA2Mx3dGeCSYSR新的坐标系

Returns ​

void


Transform ​

▸ Transform(theT): void

应用变换矩阵转换椭圆。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf转换矩阵

Returns ​

void


Transformed ​

▸ Transformed(theT): Mx3dGeEllipse

返回经过变换后的椭圆副本。

Parameters ​

NameTypeDescription
theTMx3dGeTrsf转换矩阵

Returns ​

Mx3dGeEllipse

变换后的椭圆副本


TranslateBy2Points ​

▸ TranslateBy2Points(theP1, theP2): void

椭距平移椭圆,从一点移到另一点。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint起点
theP2Mx3dGePoint终点

Returns ​

void


TranslateByVec ​

▸ TranslateByVec(theV): void

沿圆沿指定向量平移。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量

Returns ​

void


TranslatedBy2Points ​

▸ TranslatedBy2Points(theP1, theP2): Mx3dGeEllipse

返回等距平移后的椭圆副本。

Parameters ​

NameTypeDescription
theP1Mx3dGePoint起点
theP2Mx3dGePoint终点

Returns ​

Mx3dGeEllipse

平移后的椭圆副本


TranslatedByVec ​

▸ TranslatedByVec(theV): Mx3dGeEllipse

返回平移后的椭圆副本。

Parameters ​

NameTypeDescription
theVMx3dGeVec平移向量

Returns ​

Mx3dGeEllipse

平移后的椭圆副本


XAxis ​

▸ XAxis(): Mx3dGeAxis

获取椭圆的主轴,即沿主半径方向的轴。

Returns ​

Mx3dGeAxis

椭圆的主轴


YAxis ​

▸ YAxis(): Mx3dGeAxis

获取椭圆的次轴,即沿次半径方向的轴。

Returns ​

Mx3dGeAxis

椭圆的次轴