[mxcad_3d API Document](../README. md)/Mx3dGeomToroidalSurface
Class: Mx3dGeomToroidalSurface
Representing a Toroidal Surface in three-dimensional space. This type encapsulates the functionality of manipulating torus properties and methods.
Hierarchy
↳
Mx3dGeomToroidalSurface
Table of contents
Constructors
Methods
- Area
- Axis
- Bounds
- Coefficients
- Continuity
- Copy
- D0
- D1
- D2
- D3
- DN
- DynamicType
- Face
- IsCNu
- IsCNv
- IsUClosed
- IsUPeriodic
- IsVClosed
- IsVPeriodic
- Location
- MajorRadius
- MinorRadius
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- Position
- Rotate
- Rotated
- Scale
- Scaled
- SetAxis
- SetLocation
- SetMajorRadius
- SetMinorRadius
- SetPosition
- Transform
- TransformParameters
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- UPeriod
- UReverse
- UReversed
- UReversedParameter
- VPeriod
- VReverse
- VReversed
- VReversedParameter
- Value
- Volume
- DownCast
Constructors
constructor
• new Mx3dGeomToroidalSurface(A3
, MajorRadius
, MinorRadius
)
Construct a torus with a given coordinate system and primary and secondary radii.
Parameters
Name | Type | Description |
---|---|---|
A3 | Mx3dGeCSYSR (Mx3dGeCSYSR. md) | Surface Local Coordinate System (Mx3dGeCSYSR) |
MajorRadius | number | The main radius of the torus |
MinorRadius | number | The minor radius of the torus |
Overrides
Mx3dGeomElementarySurface.constructor
Methods
Area
▸ Area(): number
Calculate and return the surface area of the torus.
Returns
number
Surface area.
Axis
▸ Axis(): Mx3dGeAxis
Obtain the main axis (Z-axis) of the surface.
Returns
Definition of the main axis on the surface.
Inherited from
Mx3dGeomElementarySurface.Axis
Bounds
▸ Bounds(U1U2V1V2
): void
Set the boundary of the parameter range.
Parameters
Name | Type | Description |
---|---|---|
U1U2V1V2 | [dU1: number, dU2: number, dV1: number, dV2: number] | Parameter range [U1, U2, V1, V2] |
Returns
void
Coefficients
▸ Coefficients(Coef
): void
Obtain implicit equation coefficients.
Parameters
Name | Type | Description |
---|---|---|
Coef | number [] | coefficient array, with a length of at least 31 |
Returns
void
Continuity
▸ Continuity(): MxGAShapeEnum
Return the global continuity of the surface (MxGAShapeenum).
Returns
The continuity of the surface on a global scale.
Inherited from
Mx3dGeomElementarySurface.Continuity
Copy
▸ Copy(): Mx3dGeomObject
Create a new object that is a copy of this torus.
Returns
Copy of the torus (Mx3dGeomObject).
D0
▸ D0(U
, V
, P
): void
Calculate and return the point at the specified U and V parameters.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U |
V | number | parameter V |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output Point (Mx3dGePoint) |
Returns
void
D1
▸ D1(U
, V
, P
, D1U
, D1V
): void
Calculate the first derivative of the current point and the U and V directions.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U |
V | number | parameter V |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output Point (Mx3dGePoint) |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the U direction (Mx3dGeVec) |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the V direction (Mx3dGeVec) |
Returns
void
D2
▸ D2(U
, V
, P
, D1U
, D1V
, D2U
, D2V
, D2UV
): void
Calculate the current point, first and second derivatives.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U |
V | number | parameter V |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output Point (Mx3dGePoint) |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the U direction (Mx3dGeVec) |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the V direction (Mx3dGeVec) |
D2U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative in the U direction (Mx3dGeVec) |
D2V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative in the V direction (Mx3dGeVec) |
D2UV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second-order mixed derivative in the U and V directions (Mx3dGeVec) |
Returns
void
D3
▸ D3(U
, V
, P
, D1U
, D1V
, D2U
, D2V
, D2UV
, D3U
, D3V
, D3UUV
, D3UVV
): void
Calculate the current point, first, second, and third derivatives.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U |
V | number | parameter V |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output Point (Mx3dGePoint) |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the U direction (Mx3dGeVec) |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative in the V direction (Mx3dGeVec) |
D2U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative in the U direction (Mx3dGeVec) |
D2V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative in the V direction (Mx3dGeVec) |
D2UV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second-order mixed derivative in the U and V directions (Mx3dGeVec) |
D3U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative in the U direction (Mx3dGeVec) |
D3V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative in the V direction (Mx3dGeVec) |
D3UUV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second-order mixed third-order derivative in the U direction (Mx3dGeVec) |
D3UVV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second-order mixed third-order derivative in the V direction (Mx3dGeVec) |
Returns
void
DN
▸ DN(U
, V
, Nu
, Nv
): Mx3dGeVec
Calculate the higher-order derivative at the specified parameters (U, V).
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U |
V | number | parameter V |
Nu | number | The U-direction order of higher-order derivatives |
Nv | number | The V-direction order of higher-order derivatives |
Returns
Higher order derivative (Mx3dGeVec).
DynamicType
▸ DynamicType(): string
Return the dynamic type string of the object.
Returns
string
Dynamic type string.
Overrides
Mx3dGeomElementarySurface.DynamicType
Face
▸ Face(TolDegen
): Mx3dShapeFace
Create a plane representing a torus (represented by a face).
Parameters
Name | Type | Description |
---|---|---|
TolDegen | number | Degradation tolerance |
Returns
Flat (Mx3dShapeFace).
▸ Face(W
, Inside
): Mx3dShapeFace
Create a plane representing a torus (represented by lines).
Parameters
Name | Type | Description |
---|---|---|
W | [Mx3dShapeWire] (Mx3dShapeWire. md) | Line (Mx3dShapeWire) |
Inside | boolean | indicates whether the torus is inside |
Returns
Flat (Mx3dShapeFace).
▸ Face(UMin
, UMax
, VMin
, VMax
, TolDegen
): Mx3dShapeFace
Create a plane representing a torus (specifying the range of U, V).
Parameters
Name | Type | Description |
---|---|---|
UMin | number | minimum U parameter |
UMax | number | Maximum U parameter |
VMin | number | minimum V parameter |
VMax | number | maximum V parameter |
TolDegen | number | Degradation tolerance |
Returns
Flat (Mx3dShapeFace).
IsCNu
▸ IsCNu(N
): boolean
Check if the continuity of the surface in the U parameter direction meets the specified level.
Parameters
Name | Type | Description |
---|---|---|
N | number | The continuity level to be checked |
Returns
boolean
If the continuity level meets the condition, return true; Otherwise, return false.
Inherited from
Mx3dGeomElementarySurface.IsCNu
IsCNv
▸ IsCNv(N
): boolean
Check if the continuity of the surface in the V-parameter direction meets the specified level.
Parameters
Name | Type | Description |
---|---|---|
N | number | The continuity level to be checked |
Returns
boolean
If the continuity level meets the condition, return true; Otherwise, return false.
Inherited from
Mx3dGeomElementarySurface.IsCNv
IsUClosed
▸ IsUClosed(): boolean
Check if the torus U direction is closed.
Returns
boolean
If the U direction is closed, return true; otherwise, return false.
IsUPeriodic
▸ IsUPeriodic(): boolean
Check if the U direction of the torus is periodic.
Returns
boolean
If the U direction is periodic, return true; otherwise, return false.
IsVClosed
▸ IsVClosed(): boolean
Check if the V-direction of the torus is closed.
Returns
boolean
If the V direction is closed, return true; otherwise, return false.
IsVPeriodic
▸ IsVPeriodic(): boolean
Check if the V-direction of the torus is periodic.
Returns
boolean
If the V direction is periodic, return true; otherwise, return false.
Location
▸ Location(): Mx3dGePoint
Obtain the position points of the local coordinate system on the surface.
Returns
Surface location points.
Inherited from
Mx3dGeomElementarySurface.Location
MajorRadius
▸ MajorRadius(): number
Return the main radius of the torus.
Returns
number
Main radius.
MinorRadius
▸ MinorRadius(): number
Return the secondary radius of the torus.
Returns
number
Secondary radius.
MirrorByAxis
▸ MirrorByAxis(A1
): void
Mirror transform geometric objects through axes.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Returns
void
Inherited from
Mx3dGeomElementarySurface.MirrorByAxis
MirrorByCSYSR
▸ MirrorByCSYSR(A2
): void
Mirror transform geometric objects using a right-handed coordinate system.
Parameters
Name | Type | Description |
---|---|---|
A2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object |
Returns
void
Inherited from
Mx3dGeomElementarySurface.MirrorByCSYSR
MirrorByPoint
▸ MirrorByPoint(P
): void
Mirror transform geometric objects through points.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
Returns
void
Inherited from
Mx3dGeomElementarySurface.MirrorByPoint
MirroredByAxis
▸ MirroredByAxis(A1
): Mx3dGeomToroidalSurface
Return the new geometric object transformed through axis mirroring.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.MirroredByAxis
MirroredByCSYSR
▸ MirroredByCSYSR(A2
): Mx3dGeomToroidalSurface
Return the new geometric object after mirror transformation through the right-handed coordinate system.
Parameters
Name | Type | Description |
---|---|---|
A2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.MirroredByCSYSR
MirroredByPoint
▸ MirroredByPoint(P
): Mx3dGeomToroidalSurface
Return the new geometric object after point mirror transformation.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.MirroredByPoint
Position
▸ Position(): Mx3dGeCSYSR
Obtain the local coordinate system of the surface.
Returns
The local coordinate system of the surface.
Inherited from
Mx3dGeomElementarySurface.Position
Rotate
▸ Rotate(A1
, Ang
): void
Rotate geometric objects.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Ang | number | Rotation angle |
Returns
void
Inherited from
Mx3dGeomElementarySurface.Rotate
Rotated
▸ Rotated(A1
, Ang
): Mx3dGeomToroidalSurface
Return the rotated new geometric object.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Ang | number | Rotation angle |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.Rotated
Scale
▸ Scale(P
, S
): void
Scale geometric objects.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
S | number | scaling ratio |
Returns
void
Inherited from
Mx3dGeomElementarySurface.Scale
Scaled
▸ Scaled(P
, S
): Mx3dGeomToroidalSurface
Return the scaled new geometric object.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
S | number | scaling ratio |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.Scaled
SetAxis
▸ SetAxis(theA1
): void
Set the main axis (Z-axis) of the surface.
Parameters
Name | Type | Description |
---|---|---|
TheA1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Definition of the principal axis of the surface |
Returns
void
Inherited from
Mx3dGeomElementarySurface.SetAxis
SetLocation
▸ SetLocation(theLoc
): void
Set the position points of the surface local coordinate system.
Parameters
Name | Type | Description |
---|---|---|
TheLoc | [Mx3dGePoint] (Mx3dGePoint. md) | New location point |
Returns
void
Inherited from
Mx3dGeomElementarySurface.SetLocation
SetMajorRadius
▸ SetMajorRadius(MajorRadius
): void
Set the main radius of the torus.
Parameters
Name | Type | Description |
---|---|---|
MajorRadius | number | New primary radius. It must be non negative |
Returns
void
SetMinorRadius
▸ SetMinorRadius(MinorRadius
): void
Set the secondary radius of the torus.
Parameters
Name | Type | Description |
---|---|---|
MinorRadius | number | New secondary radius. It must be non negative |
Returns
void
SetPosition
▸ SetPosition(theAx3
): void
Set the local coordinate system of the surface.
Parameters
Name | Type | Description |
---|---|---|
TheAx3 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | A new coordinate system that includes position and orientation |
Returns
void
Inherited from
Mx3dGeomElementarySurface.SetPosition
Transform
▸ Transform(T
): void
Apply the transformation T to the torus.
Parameters
Name | Type | Description |
---|---|---|
T | [Mx3dGeTsf] (Mx3dGeTsf. md) | Transform (Mx3dGeTsf) |
Returns
void
TransformParameters
▸ TransformParameters(UV
, T
): void
Transform the surface parameters according to the given transformation matrix T.
Parameters
Name | Type | Description |
---|---|---|
UV | [dU: number, dV: number] | Parameter array containing the values of U and V |
T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform matrix |
Returns
void
Inherited from
Mx3dGeomElementarySurface.TransformParameters
Transformed
▸ Transformed(T
): Mx3dGeomToroidalSurface
Return the transformed new geometric object.
Parameters
Name | Type | Description |
---|---|---|
T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.Transformed
TranslateBy2Points
▸ TranslateBy2Points(P1
, P2
): void
Translate geometric objects through two points.
Parameters
Name | Type | Description |
---|---|---|
P1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point object |
P2 | [Mx3dGePoint] (Mx3dGePoint. md) | End point object |
Returns
void
Inherited from
Mx3dGeomElementarySurface.TranslateBy2Points
TranslateByVec
▸ TranslateByVec(V
): void
Translate geometric objects through vectors.
Parameters
Name | Type | Description |
---|---|---|
V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object |
Returns
void
Inherited from
Mx3dGeomElementarySurface.TranslateByVec
TranslatedBy2Points
▸ TranslatedBy2Points(P1
, P2
): Mx3dGeomToroidalSurface
Return the new geometric object after translating through two points.
Parameters
Name | Type | Description |
---|---|---|
P1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point object |
P2 | [Mx3dGePoint] (Mx3dGePoint. md) | End point object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.TranslatedBy2Points
TranslatedByVec
▸ TranslatedByVec(V
): Mx3dGeomToroidalSurface
Return the new geometric object after vector translation.
Parameters
Name | Type | Description |
---|---|---|
V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object |
Returns
New geometric objects.
Inherited from
Mx3dGeomElementarySurface.TranslatedByVec
UPeriod
▸ UPeriod(): number
Return the period of the surface in the U direction.
Returns
number
The period of the surface in the U direction.
Inherited from
Mx3dGeomElementarySurface.UPeriod
UReverse
▸ UReverse(): void
Reverse the parameterization direction of the surface in the U parameter direction.
Returns
void
Inherited from
Mx3dGeomElementarySurface.UReverse
UReversed
▸ UReversed(): Mx3dGeomToroidalSurface
Parameterization of reversing the U direction.
Returns
Return the current object to implement a chain call.
Inherited from
Mx3dGeomElementarySurface.UReversed
UReversedParameter
▸ UReversedParameter(U
): number
Calculate the parameter value of the torus U direction reversed on a given U parameter.
Parameters
Name | Type | Description |
---|---|---|
U | number | The original U parameter |
Returns
number
The inverted U parameter value.
VPeriod
▸ VPeriod(): number
Return the period of the surface in the V direction.
Returns
number
The period of the surface in the V direction.
Inherited from
Mx3dGeomElementarySurface.VPeriod
VReverse
▸ VReverse(): void
Reverse the parameterization direction of the surface in the V parameter direction.
Returns
void
Inherited from
Mx3dGeomElementarySurface.VReverse
VReversed
▸ VReversed(): Mx3dGeomToroidalSurface
Parameterization of reversing the V direction.
Returns
Return the current object to implement a chain call.
Inherited from
Mx3dGeomElementarySurface.VReversed
VReversedParameter
▸ VReversedParameter(V
): number
Calculate the parameter value of the torus V direction reversed on the given V parameter.
Parameters
Name | Type | Description |
---|---|---|
V | number | The original V parameter |
Returns
number
The inverted value of the V parameter.
Value
▸ Value(U
, V
): Mx3dGePoint
Calculate the points on the surface corresponding to the parameters (U, V).
Parameters
Name | Type | Description |
---|---|---|
U | number | Surface parameter U |
V | number | Surface parameter V |
Returns
Corresponding point.
Inherited from
Mx3dGeomElementarySurface.Value
Volume
▸ Volume(): number
Calculate and return the volume of the torus.
Returns
number
Volume.
DownCast
▸ Static
DownCast(theObject
): Mx3dGeomToroidalSurface
Convert parent object to Mx3dGeomToroidalSurface class object
Parameters
Name | Type | Description |
---|---|---|
TheObject | [Mx3dGeomObject] (Mx3dGeomObject. md) | Parent class object |
Returns
Mx3dGeomToroidalSurface class object