Skip to content

[mxcad_3d API Document](../README. md)/Mx3dGeomLine

Class: Mx3dGeomLine

The class representing geometric lines inherits from Mx3dGeomCurve.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dGeomLine(A1)

Constructor that accepts an axis as a parameter.

Parameters

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object

Overrides

Mx3dGeomCurve.constructor

new Mx3dGeomLine(P, V)

Constructor that accepts a point and a direction as parameters.

Parameters

NameTypeDescription
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

MxGAShapeEnum

Continuity enumeration values.


Copy

Copy(): Mx3dGeomObject

Copy the line object.

Returns

Mx3dGeomObject

Copy the line object.


D0

D0(U, P): void

Obtain the point coordinates at parameter U.

Parameters

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
The parameter value of 'U''number'
Nnumberorder

Returns

Mx3dGeVec

N-order derivative vector.


DynamicType

DynamicType(): string

Return the dynamic type of the object.

Returns

string

A dynamically typed string.

Overrides

Mx3dGeomCurve.DynamicType


Edge

Edge(p1, p2): Mx3dShapeEdge

Get the edge shape object of a straight line.

Parameters

NameTypeDescription
P1NumberThe first parameter
P2numberSecond parameter

Returns

Mx3dShapeEdge

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

NameTypeDescription
Nnumberorder

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

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object

Returns

void

Inherited from

Mx3dGeomCurve.MirrorByAxis


MirrorByCSYSR

MirrorByCSYSR(A2): void

Mirror transform geometric objects using a right-handed coordinate system.

Parameters

NameTypeDescription
A2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system object

Returns

void

Inherited from

Mx3dGeomCurve.MirrorByCSYSR


MirrorByPoint

MirrorByPoint(P): void

Mirror transform geometric objects through points.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object

Returns

void

Inherited from

Mx3dGeomCurve.MirrorByPoint


MirroredByAxis

MirroredByAxis(A1): Mx3dGeomLine

Return the new geometric object transformed through axis mirroring.

Parameters

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.MirroredByAxis


MirroredByCSYSR

MirroredByCSYSR(A2): Mx3dGeomLine

Return the new geometric object after mirror transformation through the right-handed coordinate system.

Parameters

NameTypeDescription
A2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.MirroredByCSYSR


MirroredByPoint

MirroredByPoint(P): Mx3dGeomLine

Return the new geometric object after point mirror transformation.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.MirroredByPoint


OffsetCurve

OffsetCurve(Offset, V, isNotCheckC0): Mx3dShapeEdge

Obtain the offset curve of the straight line.

Parameters

NameTypeDescription
Offsetnumberoffset value
V[Mx3dGeDir] (Mx3dGeDir. md)Direction vector, perpendicular to the offset direction
IsNotCheckC0booleanDo not check C0 continuity

Returns

Mx3dShapeEdge

The offset curve of a straight line.


ParametricTransformation

ParametricTransformation(T): number

Obtain parameter transformation.

Parameters

NameTypeDescription
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

Mx3dGeomCurve.Period


Position

Position(): Mx3dGeAxis

Obtain the position of the straight line.

Returns

Mx3dGeAxis

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

Mx3dGeomLine

New geometric curve object.

Inherited from

Mx3dGeomCurve.Reversed


ReversedParameter

ReversedParameter(U): number

Get reverse parameters.

Parameters

NameTypeDescription
The parameter value of 'U''number'

Returns

number

Reverse parameter value.


Rotate

Rotate(A1, Ang): void

Rotate geometric objects.

Parameters

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object
AngnumberRotation angle

Returns

void

Inherited from

Mx3dGeomCurve.Rotate


Rotated

Rotated(A1, Ang): Mx3dGeomLine

Return the rotated new geometric object.

Parameters

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object
AngnumberRotation angle

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.Rotated


Scale

Scale(P, S): void

Scale geometric objects.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object
Snumberscaling ratio

Returns

void

Inherited from

Mx3dGeomCurve.Scale


Scaled

Scaled(P, S): Mx3dGeomLine

Return the scaled new geometric object.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object
Snumberscaling ratio

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.Scaled


SetDirection

SetDirection(V): void

Set the direction of the line.

Parameters

NameTypeDescription
V[Mx3dGeDir] (Mx3dGeDir. md)Directional object

Returns

void


SetLocation

SetLocation(P): void

Set the position of the line.

Parameters

NameTypeDescription
P[Mx3dGePoint] (Mx3dGePoint. md)Point object

Returns

void


SetPosition

SetPosition(A1): void

Set the position of the line.

Parameters

NameTypeDescription
A1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis object

Returns

void


Transform

Transform(T): void

Transform the straight line.

Parameters

NameTypeDescription
T[Mx3dGetStrf] (Mx3dGetStrf. md)Transform the object

Returns

void


Transformed

Transformed(T): Mx3dGeomLine

Return the transformed new geometric object.

Parameters

NameTypeDescription
T[Mx3dGetStrf] (Mx3dGetStrf. md)Transform the object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.Transformed


TransformedParameter

TransformedParameter(U, T): number

Obtain the transformed parameters.

Parameters

NameTypeDescription
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

NameTypeDescription
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

NameTypeDescription
V[Mx3dGeVec] (Mx3dGeVec. md)Vector object

Returns

void

Inherited from

Mx3dGeomCurve.TranslateByVec


TranslatedBy2Points

TranslatedBy2Points(P1, P2): Mx3dGeomLine

Return the new geometric object after translating through two points.

Parameters

NameTypeDescription
P1[Mx3dGePoint] (Mx3dGePoint. md)Starting point object
P2[Mx3dGePoint] (Mx3dGePoint. md)End point object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.TranslatedBy2Points


TranslatedByVec

TranslatedByVec(V): Mx3dGeomLine

Return the new geometric object after vector translation.

Parameters

NameTypeDescription
V[Mx3dGeVec] (Mx3dGeVec. md)Vector object

Returns

Mx3dGeomLine

New geometric objects.

Inherited from

Mx3dGeomCurve.TranslatedByVec


Value

Value(U): Mx3dGePoint

Return the point at the given parameter U.

Parameters

NameTypeDescription
The parameter value of 'U''number'

Returns

Mx3dGePoint

The point object at the given parameter.

Inherited from

Mx3dGeomCurve.Value


DownCast

Static DownCast(theObject): Mx3dGeomLine

Convert parent object to Mx3dGeomLine class object

Parameters

NameTypeDescription
TheObject[Mx3dGeomObject] (Mx3dGeomObject. md)Parent class object

Returns

Mx3dGeomLine

Mx3dGeomLine class object