[mxcad_3d API Document](../README. md)/Mx3dGeomLine
Class: Mx3dGeomLine 
The class representing geometric lines inherits from Mx3dGeomCurve.
Hierarchy 
- ↳ - Mx3dGeomLine
Table of contents 
Constructors 
Methods 
- Continuity
- Copy
- D0
- D1
- D2
- D3
- DN
- DynamicType
- Edge
- FirstParameter
- IsCN
- IsClosed
- IsPeriodic
- LastParameter
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- OffsetCurve
- ParametricTransformation
- Period
- Position
- Reverse
- Reversed
- ReversedParameter
- Rotate
- Rotated
- Scale
- Scaled
- SetDirection
- SetLocation
- SetPosition
- Transform
- Transformed
- TransformedParameter
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- Value
- DownCast
Constructors 
constructor 
• new Mx3dGeomLine(A1)
Constructor that accepts an axis as a parameter.
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object | 
Overrides 
• new Mx3dGeomLine(P, V)
Constructor that accepts a point and a direction as parameters.
Parameters 
| Name | Type | Description | 
|---|---|---|
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
| V | [Mx3dGeDir] (Mx3dGeDir. md) | Directional object | 
Overrides 
Mx3dGeomCurve.constructor
Methods 
Continuity 
▸ Continuity(): MxGAShapeEnum
Obtain the continuity of a straight line.
Returns 
Continuity enumeration values.
Copy 
▸ Copy(): Mx3dGeomObject
Copy the line object.
Returns 
Copy the line object.
D0 
▸ D0(U, P): void
Obtain the point coordinates at parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
Returns 
void
D1 
▸ D1(U, P, V1): void
Obtain the first derivative at parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
| V1 | [Mx3dGeVec] (Mx3dGeVec. md) | First derivative vector | 
Returns 
void
D2 
▸ D2(U, P, V1, V2): void
Obtain the second derivative at parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
| V1 | [Mx3dGeVec] (Mx3dGeVec. md) | First derivative vector | 
| V2 | [Mx3dGeVec] (Mx3dGeVec. md) | Second derivative vector | 
Returns 
void
D3 
▸ D3(U, P, V1, V2, V3): void
Obtain the third derivative at parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
| V1 | [Mx3dGeVec] (Mx3dGeVec. md) | First derivative vector | 
| V2 | [Mx3dGeVec] (Mx3dGeVec. md) | Second derivative vector | 
| V3 | [Mx3dGeVec] (Mx3dGeVec. md) | Third derivative vector | 
Returns 
void
DN 
▸ DN(U, N): Mx3dGeVec
Obtain the Nth derivative at parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| N | number | order | 
Returns 
N-order derivative vector.
DynamicType 
▸ DynamicType(): string
Return the dynamic type of the object.
Returns 
string
A dynamically typed string.
Overrides 
Edge 
▸ Edge(p1, p2): Mx3dShapeEdge
Get the edge shape object of a straight line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| P1 | Number | The first parameter | 
| P2 | number | Second parameter | 
Returns 
The edge shape object of a straight line.
FirstParameter 
▸ FirstParameter(): number
Get the first parameter of the line.
Returns 
number
The first parameter.
IsCN 
▸ IsCN(N): boolean
Check if the straight line is C ^ N continuous.
Parameters 
| Name | Type | Description | 
|---|---|---|
| N | number | order | 
Returns 
boolean
If the line is C ^ N continuous, return true; Otherwise, return false.
IsClosed 
▸ IsClosed(): boolean
Check if the straight line is closed.
Returns 
boolean
If the line is closed, return true; Otherwise, return false.
IsPeriodic 
▸ IsPeriodic(): boolean
Check if the straight line is periodic.
Returns 
boolean
If the line is periodic, return true; Otherwise, return false.
LastParameter 
▸ LastParameter(): number
Get the last parameter of the line.
Returns 
number
The last parameter.
MirrorByAxis 
▸ MirrorByAxis(A1): void
Mirror transform geometric objects through axes.
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object | 
Returns 
void
Inherited from 
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 
MirrorByPoint 
▸ MirrorByPoint(P): void
Mirror transform geometric objects through points.
Parameters 
| Name | Type | Description | 
|---|---|---|
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
Returns 
void
Inherited from 
MirroredByAxis 
▸ MirroredByAxis(A1): Mx3dGeomLine
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 
MirroredByCSYSR 
▸ MirroredByCSYSR(A2): Mx3dGeomLine
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 
MirroredByPoint 
▸ MirroredByPoint(P): Mx3dGeomLine
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 
OffsetCurve 
▸ OffsetCurve(Offset, V, isNotCheckC0): Mx3dShapeEdge
Obtain the offset curve of the straight line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| Offset | number | offset value | 
| V | [Mx3dGeDir] (Mx3dGeDir. md) | Direction vector, perpendicular to the offset direction | 
| IsNotCheckC0 | boolean | Do not check C0 continuity | 
Returns 
The offset curve of a straight line.
ParametricTransformation 
▸ ParametricTransformation(T): number
Obtain parameter transformation.
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
number
Parameter transformation value.
Period 
▸ Period(): number
Return the period of the curve.
Returns 
number
The period of the curve.
Inherited from 
Position 
▸ Position(): Mx3dGeAxis
Obtain the position of the straight line.
Returns 
Axis object.
Reverse 
▸ Reverse(): void
Reverse the direction of a straight line.
Returns 
void
Reversed 
▸ Reversed(): Mx3dGeomLine
Return the new geometric curve object in reverse.
Returns 
New geometric curve object.
Inherited from 
ReversedParameter 
▸ ReversedParameter(U): number
Get reverse parameters.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | 
Returns 
number
Reverse parameter value.
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 
Rotated 
▸ Rotated(A1, Ang): Mx3dGeomLine
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 
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 
Scaled 
▸ Scaled(P, S): Mx3dGeomLine
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 
SetDirection 
▸ SetDirection(V): void
Set the direction of the line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| V | [Mx3dGeDir] (Mx3dGeDir. md) | Directional object | 
Returns 
void
SetLocation 
▸ SetLocation(P): void
Set the position of the line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object | 
Returns 
void
SetPosition 
▸ SetPosition(A1): void
Set the position of the line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object | 
Returns 
void
Transform 
▸ Transform(T): void
Transform the straight line.
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
void
Transformed 
▸ Transformed(T): Mx3dGeomLine
Return the transformed new geometric object.
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
New geometric objects.
Inherited from 
TransformedParameter 
▸ TransformedParameter(U, T): number
Obtain the transformed parameters.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | |
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object | 
Returns 
number
The transformed parameter values.
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 
Mx3dGeomCurve.TranslateBy2Points
TranslateByVec 
▸ TranslateByVec(V): void
Translate geometric objects through vectors.
Parameters 
| Name | Type | Description | 
|---|---|---|
| V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object | 
Returns 
void
Inherited from 
TranslatedBy2Points 
▸ TranslatedBy2Points(P1, P2): Mx3dGeomLine
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 
Mx3dGeomCurve.TranslatedBy2Points
TranslatedByVec 
▸ TranslatedByVec(V): Mx3dGeomLine
Return the new geometric object after vector translation.
Parameters 
| Name | Type | Description | 
|---|---|---|
| V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object | 
Returns 
New geometric objects.
Inherited from 
Value 
▸ Value(U): Mx3dGePoint
Return the point at the given parameter U.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The parameter value of 'U' | 'number' | 
Returns 
The point object at the given parameter.
Inherited from 
DownCast 
▸ Static DownCast(theObject): Mx3dGeomLine
Convert parent object to Mx3dGeomLine class object
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheObject | [Mx3dGeomObject] (Mx3dGeomObject. md) | Parent class object | 
Returns 
Mx3dGeomLine class object