[mxcad_3d API Document](../README. md)/Mx3dGeCircuit
Class: Mx3dGeCircle
Non parametric geometric circle
Hierarchy
↳
Mx3dGeCircle
Table of contents
Constructors
Methods
- Area
- Axis
- Contains
- Distance
- Length
- Location
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Position
- Radius
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetLocation
- SetPosition
- SetRadius
- SquareDistance
- Transform
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- XAxis
- YAxis
Constructors
constructor
• new Mx3dGeCircle()
Create a default circular object.
Overrides
Mx3dGeObject.constructor
• new Mx3dGeCircle(theA2
, theRadius
)
Create a circular object with a coordinate system and radius.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Coordinate system |
TheRadius | Number | The radius of a circle |
Overrides
Mx3dGeObject.constructor
Methods
Area
▸ Area(): number
Return the area of a circle.
Returns
number
The area of a circle.
Axis
▸ Axis(): Mx3dGeAxis
Return the axis of the circle.
Returns
The axis of a circle.
Contains
▸ Contains(theP
, theLinearTolerance
): boolean
Determine whether a point is on a circle.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Point |
The LinearTolerance | Number | Linear Tolerance |
Returns
boolean
If the point is on a circle, return true; otherwise, return false.
Distance
▸ Distance(theP
): number
Calculate the distance from a circle to a point.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Point |
Returns
number
Distance value.
Length
▸ Length(): number
Return the circumference of a circle.
Returns
number
The circumference of a circle.
Location
▸ Location(): Mx3dGePoint
Return the position of the circle.
Returns
The position point of the circle.
MirrorByAxis
▸ MirrorByAxis(theA1
): void
Mirror the current circle based on an axis.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
void
MirrorByCSYSR
▸ MirrorByCSYSR(theA2
): void
Mirror the current circle based on a coordinate system.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Mirror coordinate system |
Returns
void
MirrorByPoint
▸ MirrorByPoint(theP
): void
Mirror the current circle based on a point.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
void
MirroredByAxis
▸ MirroredByAxis(theA1
): Mx3dGeCircle
Return the circle mirrored based on an axis.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror axis |
Returns
The circle after mirroring.
MirroredByCSYSR
▸ MirroredByCSYSR(theA2
): Mx3dGeCircle
Return the circle mirrored based on a coordinate system.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Mirror coordinate system |
Returns
The circle after mirroring.
MirroredByPoint
▸ MirroredByPoint(theP
): Mx3dGeCircle
Return the circle mirrored based on a point.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Mirror point |
Returns
The circle after mirroring.
Position
▸ Position(): Mx3dGeCSYSR
Return the coordinate system of a circle.
Returns
The coordinate system of a circle.
Radius
▸ Radius(): number
Return the radius of the circle.
Returns
number
The radius of a circle.
Rotate
▸ Rotate(theA1
, theAng
): void
Rotate the current circle.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
TheAng | Number | Rotation angle |
Returns
void
Rotated
▸ Rotated(theA1
, theAng
): Mx3dGeCircle
Return the rotated circle.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis |
TheAng | Number | Rotation angle |
Returns
The rotated circle.
Scale
▸ Scale(theP
, theS
): void
Scale the current circle.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
TheS | Number | Scale ratio |
Returns
void
Scaled
▸ Scaled(theP
, theS
): Mx3dGeCircle
Return the scaled circle.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Zoom center point |
TheS | Number | Scale ratio |
Returns
The scaled circle.
SetAxis
▸ SetAxis(theA1
): void
Set the axis of the circle.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | The axis of a circle |
Returns
void
SetLocation
▸ SetLocation(theP
): void
Set the position of the circle.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | The position point of the circle |
Returns
void
SetPosition
▸ SetPosition(theA2
): void
Set the coordinate system for the circle.
Parameters
Name | Type | Description |
---|---|---|
TheA2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | The coordinate system of a circle |
Returns
void
SetRadius
▸ SetRadius(theRadius
): void
Set the radius of the circle.
Parameters
Name | Type | Description |
---|---|---|
TheRadius | Number | The radius of a circle |
Returns
void
SquareDistance
▸ SquareDistance(theP
): number
Calculate the square distance from a circle to a point.
Parameters
Name | Type | Description |
---|---|---|
TheP | [Mx3dGePoint] (Mx3dGePoint. md) | Point |
Returns
number
Square distance value.
Transform
▸ Transform(theT
): void
Transform the current circle according to the transformation matrix.
Parameters
Name | Type | Description |
---|---|---|
theT | [Mx3dGeTsf ] (Mx3dGeTsf. md) | Transform matrix |
Returns
void
Transformed
▸ Transformed(theT
): Mx3dGeCircle
Return the circle transformed according to the transformation matrix.
Parameters
Name | Type | Description |
---|---|---|
theT | [Mx3dGeTsf ] (Mx3dGeTsf. md) | Transform matrix |
Returns
The transformed circle.
TranslateBy2Points
▸ TranslateBy2Points(theP1
, theP2
): void
Translate the current circle based on two points.
Parameters
Name | Type | Description |
---|---|---|
TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point |
TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint |
Returns
void
TranslateByVec
▸ TranslateByVec(theV
): void
Translate the current circle based on the vector.
Parameters
Name | Type | Description |
---|---|---|
TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector |
Returns
void
TranslatedBy2Points
▸ TranslatedBy2Points(theP1
, theP2
): Mx3dGeCircle
Return the circle translated based on two points.
Parameters
Name | Type | Description |
---|---|---|
TheP1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point |
TheP2 | [Mx3dGePoint] (Mx3dGePoint. md) | Endpoint |
Returns
The circle after translation.
TranslatedByVec
▸ TranslatedByVec(theV
): Mx3dGeCircle
Return the circle translated according to the vector.
Parameters
Name | Type | Description |
---|---|---|
TheV | [Mx3dGeVec] (Mx3dGeVec. md) | Translation vector |
Returns
The circle after translation.
XAxis
▸ XAxis(): Mx3dGeAxis
Return the X-axis of the circle.
Returns
The X-axis of a circle.
YAxis
▸ YAxis(): Mx3dGeAxis
Return the Y-axis of the circle.
Returns
The Y-axis of a circle.