mxcad_3d API 文档 / Mx3dGeEllipse
Class: Mx3dGeEllipse 
表示三维空间中的椭圆对象,继承自Mx3dGeObject类。 支持通过不同参数构造椭圆,并提供了丰富的属性访问与操作方法。
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()
构造一个未初始化的椭圆实例。
Overrides 
Mx3dGeObject.constructor
• new Mx3dGeEllipse(theA2, theMajorRadius, theMinorRadius)
根据给定的坐标系和半径构造椭圆。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 椭圆所在的坐标系 | 
| theMajorRadius | number | 主半径 | 
| theMinorRadius | number | 次半径 | 
Overrides 
Mx3dGeObject.constructor
Methods 
Area 
▸ Area(): number
计算并返回椭圆的面积。
Returns 
number
椭圆的面积
Axis 
▸ Axis(): Mx3dGeAxis
返回椭圆的轴。
Returns 
椭圆的轴
Directrix1 
▸ Directrix1(): Mx3dGeAxis
获取椭圆的第一条直接线,是垂直于主轴的直线,位于椭圆上,满足特定几何关系。
Returns 
直线1
Directrix2 
▸ Directrix2(): Mx3dGeAxis
获取椭圆的第二条直接线,是垂直于主轴的直线,位于椭圆上,满足特定几何关系。
Returns 
直线2
Eccentricity 
▸ Eccentricity(): number
计算并返回椭圆的离心率,即焦距与半长轴之比。
Returns 
number
离心率
Focal 
▸ Focal(): number
计算并返回椭圆的焦距,两焦点之间的距离。
Returns 
number
焦距
Focus1 
▸ Focus1(): Mx3dGePoint
获取椭圆的第一个焦点。
Returns 
第一焦点
Focus2 
▸ Focus2(): Mx3dGePoint
获取椭圆的第二个焦点。
Returns 
二焦点
Location 
▸ Location(): Mx3dGePoint
获取椭圆的当前位置,即中心点。
Returns 
当前位置
MajorRadius 
▸ MajorRadius(): number
获取椭圆的主半径。
Returns 
number
主半径
MinorRadius 
▸ MinorRadius(): number
获取椭圆的次半径。
Returns 
number
次半径
MirrorByAxis 
▸ MirrorByAxis(theA1): void
对椭圆执行镜像操作,以指定轴为对称轴。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 镜像操作的轴 | 
Returns 
void
MirrorByCSYSR 
▸ MirrorByCSYSR(theA2): void
对椭圆执行镜像操作,以指定坐标系所在的平面为对称面。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 镜像操作的坐标系 | 
Returns 
void
MirrorByPoint 
▸ MirrorByPoint(theP): void
对椭圆执行镜像操作,以指定点为中心进行对称变换。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像操作的中心点 | 
Returns 
void
MirroredByAxis 
▸ MirroredByAxis(theA1): Mx3dGeEllipse
返回沿指定轴镜像后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 镜像操作的轴 | 
Returns 
镜像后的椭圆副本
MirroredByCSYSR 
▸ MirroredByCSYSR(theA2): Mx3dGeEllipse
返回沿指定坐标系所在平面镜像后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 镜像操作的坐标系 | 
Returns 
镜像后的椭圆副本
MirroredByPoint 
▸ MirroredByPoint(theP): Mx3dGeEllipse
返回沿指定点镜像后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 镜像操作的中心点 | 
Returns 
镜像后的椭圆副本
Parameter 
▸ Parameter(): number
获取椭圆的参数,可能指椭圆上某点对应的参数方程中的参数。
Returns 
number
参数值
Position 
▸ Position(): Mx3dGeCSYSR
获取椭圆的位置坐标系,定义椭圆所在的坐标框架。
Returns 
位置坐标系
Rotate 
▸ Rotate(theA1, theAng): void
旋转椭圆,围绕指定轴按给定角度执行旋转操作。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴 | 
| theAng | number | 旋转角度(弧度) | 
Returns 
void
Rotated 
▸ Rotated(theA1, theAng): Mx3dGeEllipse
返回旋转后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 旋转轴 | 
| theAng | number | 旋转角度(弧度) | 
Returns 
旋转后的椭圆副本
Scale 
▸ Scale(theP, theS): void
缩放椭圆,从指定点出发按给定比例缩放。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点 | 
| theS | number | 缩放比例 | 
Returns 
void
Scaled 
▸ Scaled(theP, theS): Mx3dGeEllipse
返回缩放后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 缩放中心点 | 
| theS | number | 缩放比例 | 
Returns 
缩放后的椭圆副本
SetAxis 
▸ SetAxis(theA1): void
设置椭圆的轴。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA1 | Mx3dGeAxis | 新的轴 | 
Returns 
void
SetLocation 
▸ SetLocation(theP): void
设置椭圆的位置。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP | Mx3dGePoint | 新的位置点 | 
Returns 
void
SetMajorRadius 
▸ SetMajorRadius(theMajorRadius): void
设置椭圆的主半径。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theMajorRadius | number | 新的主半径 | 
Returns 
void
SetMinorRadius 
▸ SetMinorRadius(theMinorRadius): void
设置椭圆的次半径。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theMinorRadius | number | 新的次半径 | 
Returns 
void
SetPosition 
▸ SetPosition(theA2): void
设置椭圆的坐标系。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theA2 | Mx3dGeCSYSR | 新的坐标系 | 
Returns 
void
Transform 
▸ Transform(theT): void
应用变换矩阵转换椭圆。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 转换矩阵 | 
Returns 
void
Transformed 
▸ Transformed(theT): Mx3dGeEllipse
返回经过变换后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theT | Mx3dGeTrsf | 转换矩阵 | 
Returns 
变换后的椭圆副本
TranslateBy2Points 
▸ TranslateBy2Points(theP1, theP2): void
椭距平移椭圆,从一点移到另一点。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 起点 | 
| theP2 | Mx3dGePoint | 终点 | 
Returns 
void
TranslateByVec 
▸ TranslateByVec(theV): void
沿圆沿指定向量平移。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量 | 
Returns 
void
TranslatedBy2Points 
▸ TranslatedBy2Points(theP1, theP2): Mx3dGeEllipse
返回等距平移后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theP1 | Mx3dGePoint | 起点 | 
| theP2 | Mx3dGePoint | 终点 | 
Returns 
平移后的椭圆副本
TranslatedByVec 
▸ TranslatedByVec(theV): Mx3dGeEllipse
返回平移后的椭圆副本。
Parameters 
| Name | Type | Description | 
|---|---|---|
| theV | Mx3dGeVec | 平移向量 | 
Returns 
平移后的椭圆副本
XAxis 
▸ XAxis(): Mx3dGeAxis
获取椭圆的主轴,即沿主半径方向的轴。
Returns 
椭圆的主轴
YAxis 
▸ YAxis(): Mx3dGeAxis
获取椭圆的次轴,即沿次半径方向的轴。
Returns 
椭圆的次轴