Skip to content

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

Class: Mx3dGeomPlane

The Mx3dGeomPlane class provides the ability to describe and manipulate planes in 3D space. A plane is defined by a coordinate system (Mx3dGeCSYSR) and can be described by its normal vector, origin, and parameter direction.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dGeomPlane(A3)

Construct a plane in 3D space based on the specified axial position.

Parameters

NameTypeDescription
A3[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Define the coordinate system for plane position and orientation (Mx3dGeCSYSR)

Overrides

Mx3dGeomElementarySurface.constructor

new Mx3dGeomPlane(P, V)

Construct a plane based on a point and a normal vector.

Parameters

NameTypeDescription
PUniPointThe origin of the plane
VUniDirtNormal vector, pointing in the direction of the plane

Overrides

Mx3dGeomElementarySurface.constructor

new Mx3dGeomPlane(A, B, C, D)

Construct a plane based on the coefficients of the plane equation.

Parameters

NameTypeDescription
AnumberThe coefficient A of the equation Ax+By+Cz+D=0
The coefficient B of the equation Ax+By+Cz+D=0
The coefficient C of the equation Ax+By+Cz+D=0
The coefficient D of the equation Ax+By+Cz+D=0

Overrides

Mx3dGeomElementarySurface.constructor

Methods

Axis

Axis(): Mx3dGeAxis

Obtain the main axis (Z-axis) of the surface.

Returns

Mx3dGeAxis

Definition of the main axis on the surface.

Inherited from

Mx3dGeomElementarySurface.Axis


Bounds

Bounds(U1U2V1V2): void

Calculate the parameter range of the plane.

Parameters

NameTypeDescription
U1U2V1V2[dU1: number, dU2: number, dV1: number, dV2: number]Parameter range array [dU1, dU2, dV1, dV2]

Returns

void


Coefficients

Coefficients(ABCD): void

Calculate the coefficients of the plane equation.

Parameters

NameTypeDescription
ABCD[dA: number, dB: number, dC: number, dD: number]Coefficient array [dA, dB, dC, dD]

Returns

void


Continuity

Continuity(): MxGAShapeEnum

Return the global continuity of the surface (MxGAShapeenum).

Returns

MxGAShapeEnum

The continuity of the surface on a global scale.

Inherited from

Mx3dGeomElementarySurface.Continuity


Copy

Copy(): Mx3dGeomObject

Create a new object as a copy of the plane.

Returns

Mx3dGeomObject

Return a new flat object (Mx3dGeomObject).


D0

D0(U, V, P): void

Calculate the point at the specified U and V parameter values.

Parameters

NameTypeDescription
UnumberU parameter value
VnumberV parameter value
P[Mx3dGePoint] (Mx3dGePoint. md)Used to store the target object (Mx3dGePoint) for computing points. The calculation formula is P=O+U * XDir+V * YDir, where O is the origin of the plane, XDir and YDir are the basis vectors in the U and V parameter directions, respectively

Returns

void


D1

D1(U, V, P, D1U, D1V): void

Calculate the point and its first derivative at the specified U and V parameter values.

Parameters

NameTypeDescription
UnumberU parameter value
VnumberV parameter value
P[Mx3dGePoint] (Mx3dGePoint. md)Used to store the target object (Mx3dGePoint) for computing points
D1U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the first derivative in the U direction
D1V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the first derivative in the V direction. The calculation formula is: - point: P = O + U * XDir + V * YDir。 - The first derivative: D1U and D1V are partial derivatives of XDir and YDir, respectively

Returns

void


D2

D2(U, V, P, D1U, D1V, D2U, D2V, D2UV): void

Calculate the point, first and second derivatives at the specified U and V parameter values.

Parameters

NameTypeDescription
UnumberU parameter value
VnumberV parameter value
P[Mx3dGePoint] (Mx3dGePoint. md)Used to store the target object (Mx3dGePoint) for computing points
D1U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the first derivative in the U direction
D1V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the first derivative in the V direction
D2U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the second derivative in the U direction
D2V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the second derivative in the V direction
D2UV[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the second derivative in the UV direction. The calculation formula is: - point: P = O + U * XDir + V * YDir。 - The first derivative: D1U and D1V are partial derivatives of XDir and YDir, respectively- Second derivative: D2U, D2V, and D2UV are second-order partial derivatives

Returns

void


D3

D3(U, V, P, D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV): void

Calculate the point, first, second, and third derivatives at the specified U and V parameter values.

Parameters

NameTypeDescription
UnumberU parameter value
VnumberV parameter value
P[Mx3dGePoint] (Mx3dGePoint. md)Used to store the target object (Mx3dGePoint) for computing points
D1U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the first derivative in the U direction
D1V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the first derivative in the V direction
D2U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the second derivative in the U direction
D2V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the second derivative in the V direction
D2UV[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the second derivative in the UV direction
D3U[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the third derivative in the U direction
D3V[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) for the third derivative in the V direction
D3UUV[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the third derivative in the UUU direction
D3UVV[Mx3dGeVec] (Mx3dGeVec. md)Used to store the target object (Mx3dGeVec) of the third derivative in the UVV direction. The calculation formula is: - point: P = O + U * XDir + V * YDir。 - The first derivative: D1U and D1V are partial derivatives of XDir and YDir, respectively- Second derivative: D2U, D2V, and D2UV are second-order partial derivatives- Third derivative: D3U, D3V, D3UUV, and D3UVV are third order partial derivatives

Returns

void


DN

DN(U, V, Nu, Nv): Mx3dGeVec

Calculate the derivative of the specified order at the specified U and V parameter values.

Parameters

NameTypeDescription
UnumberU parameter value
VnumberV parameter value
Nunumberderivative order in the U direction
Nvnumberderivative order in the V direction

Returns

Mx3dGeVec

Return the computed vector object (Mx3dGeVec).

Throws

Error: If Nu+Nv<1 or Nu<0 or Nv<0, throw an exception. The calculation formula is to calculate the partial derivative of a specified order and return the corresponding vector.


DynamicType

DynamicType(): string

Return the dynamic type string of the object.

Returns

string

Type name string.

Overrides

Mx3dGeomElementarySurface.DynamicType


Face

Face(TolDegen): Mx3dShapeFace

Generate a flat surface based on tolerances.

Parameters

NameTypeDescription
Toledennumbertolerance value

Returns

Mx3dShapeFace

The generated flat surface (Mx3dShapeFace).

Face(W, Inside): Mx3dShapeFace

Generate a planar surface based on the given contour line and whether it is internally generated.

Parameters

NameTypeDescription
W[Mx3dShapeWire] (Mx3dShapeWire. md)Contour Line (Mx3dShapeWire)
InsidebooleanIs it inside

Returns

Mx3dShapeFace

The generated flat surface (Mx3dShapeFace).

Face(UMin, UMax, VMin, VMax, TolDegen): Mx3dShapeFace

Generate a flat surface based on the range of U and V and tolerances.

Parameters

NameTypeDescription
UMinnumberThe minimum value in the U direction
UMaxnumbermaximum value in the U direction
VMinnumberminimum value in the V direction
VMaxnumbermaximum value in the V direction
Toledennumbertolerance value

Returns

Mx3dShapeFace

The generated flat surface (Mx3dShapeFace).


IsCNu

IsCNu(N): boolean

Check if the continuity of the surface in the U parameter direction meets the specified level.

Parameters

NameTypeDescription
NnumberThe 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

NameTypeDescription
NnumberThe 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

Determine whether the plane is closed in the U direction.

Returns

boolean

Return false.


IsUPeriodic

IsUPeriodic(): boolean

Determine whether the plane is periodic in the U direction.

Returns

boolean

Return false.


IsVClosed

IsVClosed(): boolean

Determine whether the plane is closed in the V direction.

Returns

boolean

Return false.


IsVPeriodic

IsVPeriodic(): boolean

Determine whether the plane is periodic in the V direction.

Returns

boolean

Return false.


Location

Location(): Mx3dGePoint

Obtain the position points of the local coordinate system on the surface.

Returns

Mx3dGePoint

Surface location points.

Inherited from

Mx3dGeomElementarySurface.Location


MirrorByAxis

MirrorByAxis(A1): void

Mirror transform geometric objects through axes.

Parameters

NameTypeDescription
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

NameTypeDescription
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

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

Returns

void

Inherited from

Mx3dGeomElementarySurface.MirrorByPoint


MirroredByAxis

MirroredByAxis(A1): Mx3dGeomPlane

Return the new geometric object transformed through axis mirroring.

Parameters

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

Returns

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.MirroredByAxis


MirroredByCSYSR

MirroredByCSYSR(A2): Mx3dGeomPlane

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

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.MirroredByCSYSR


MirroredByPoint

MirroredByPoint(P): Mx3dGeomPlane

Return the new geometric object after point mirror transformation.

Parameters

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

Returns

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.MirroredByPoint


Position

Position(): Mx3dGeCSYSR

Obtain the local coordinate system of the surface.

Returns

Mx3dGeCSYSR

The local coordinate system of the surface.

Inherited from

Mx3dGeomElementarySurface.Position


Rotate

Rotate(A1, Ang): void

Rotate geometric objects.

Parameters

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

Returns

void

Inherited from

Mx3dGeomElementarySurface.Rotate


Rotated

Rotated(A1, Ang): Mx3dGeomPlane

Return the rotated new geometric object.

Parameters

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

Returns

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.Rotated


Scale

Scale(P, S): void

Scale geometric objects.

Parameters

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

Returns

void

Inherited from

Mx3dGeomElementarySurface.Scale


Scaled

Scaled(P, S): Mx3dGeomPlane

Return the scaled new geometric object.

Parameters

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

Returns

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.Scaled


SetAxis

SetAxis(theA1): void

Set the main axis (Z-axis) of the surface.

Parameters

NameTypeDescription
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

NameTypeDescription
TheLoc[Mx3dGePoint] (Mx3dGePoint. md)New location point

Returns

void

Inherited from

Mx3dGeomElementarySurface.SetLocation


SetPosition

SetPosition(theAx3): void

Set the local coordinate system of the surface.

Parameters

NameTypeDescription
TheAx3[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)A new coordinate system that includes position and orientation

Returns

void

Inherited from

Mx3dGeomElementarySurface.SetPosition


Transform

Transform(T): void

Apply transformation T to the plane.

Parameters

NameTypeDescription
T[Mx3dGeTsf] (Mx3dGeTsf. md)Transform (Mx3dGeTsf)

Returns

void


TransformParameters

TransformParameters(UV, T): void

Apply the U and V parameters, as well as the transformation T, to the plane.

Parameters

NameTypeDescription
UV[dU: number, dV: number]Parameter value array [dU, dV]
T[Mx3dGeTsf] (Mx3dGeTsf. md)Transform (Mx3dGeTsf)

Returns

void

Overrides

Mx3dGeomElementarySurface.TransformParameters


Transformed

Transformed(T): Mx3dGeomPlane

Return the transformed new geometric object.

Parameters

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

Returns

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.Transformed


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

Mx3dGeomElementarySurface.TranslateBy2Points


TranslateByVec

TranslateByVec(V): void

Translate geometric objects through vectors.

Parameters

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

Returns

void

Inherited from

Mx3dGeomElementarySurface.TranslateByVec


TranslatedBy2Points

TranslatedBy2Points(P1, P2): Mx3dGeomPlane

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

Mx3dGeomPlane

New geometric objects.

Inherited from

Mx3dGeomElementarySurface.TranslatedBy2Points


TranslatedByVec

TranslatedByVec(V): Mx3dGeomPlane

Return the new geometric object after vector translation.

Parameters

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

Returns

Mx3dGeomPlane

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

Flip the direction of the plane in the U parameter direction.

Returns

void

Overrides

Mx3dGeomElementarySurface.UReverse


UReversed

UReversed(): Mx3dGeomPlane

Parameterization of reversing the U direction.

Returns

Mx3dGeomPlane

Return the current object to implement a chain call.

Inherited from

Mx3dGeomElementarySurface.UReversed


UReversedParameter

UReversedParameter(U): number

Calculate the U-parameter value after flipping the U-parameter direction in the plane.

Parameters

NameTypeDescription
UnumberThe original U parameter

Returns

number

Flipped U parameter.


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

Flip the direction of the plane in the direction of the V parameter.

Returns

void

Overrides

Mx3dGeomElementarySurface.VReverse


VReversed

VReversed(): Mx3dGeomPlane

Parameterization of reversing the V direction.

Returns

Mx3dGeomPlane

Return the current object to implement a chain call.

Inherited from

Mx3dGeomElementarySurface.VReversed


VReversedParameter

VReversedParameter(V): number

Calculate the V parameter value after flipping the V parameter direction in the plane.

Parameters

NameTypeDescription
VnumberThe original V parameter

Returns

number

The flipped V parameter.


Value

Value(U, V): Mx3dGePoint

Calculate the points on the surface corresponding to the parameters (U, V).

Parameters

NameTypeDescription
UnumberSurface parameter U
VnumberSurface parameter V

Returns

Mx3dGePoint

Corresponding point.

Inherited from

Mx3dGeomElementarySurface.Value


DownCast

Static DownCast(theObject): Mx3dGeomPlane

Convert parent class object to Mx3dGeomPlane class object

Parameters

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

Returns

Mx3dGeomPlane

Mx3dGeomPlane class object