Skip to content

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

Class: Mx3dGePlane

Represents a plane in 3D geometry. Plane objects can be defined in various ways such as coordinate systems, points, direction vectors, etc., and provide multiple geometric transformations and operation methods.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dGePlane()

The default constructor creates a plane.

Overrides

Mx3dGeObject.constructor

new Mx3dGePlane(theA3)

Constructor, initializes the plane using the specified coordinate system.

Parameters

NameTypeDescription
TheA3[Mx3dGeCSYS] (Mx3dGeCSYS. md)Used to initialize the coordinate system (CSYS) object of the plane

Overrides

Mx3dGeObject.constructor

new Mx3dGePlane(theP, theV)

Constructor, initializes a plane using specified points and vectors.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Point on the plane
TheV[Mx3dGeDir] (Mx3dGeDir. md)A vector perpendicular to the plane, used to define the direction of the plane

Overrides

Mx3dGeObject.constructor

new Mx3dGePlane(theA, theB, theC, theD)

Constructor, initialize the plane using the coefficients of the plane equation.

Parameters

NameTypeDescription
The coefficient A in the plane equation
The coefficient B in the plane equation
The coefficient C in the plane equation
The coefficient D in the plane equation

Overrides

Mx3dGeObject.constructor

Methods

Axis

Axis(): Mx3dGeAxis

Obtain the normal axis of the plane.

Returns

Mx3dGeAxis

The normal axial object of a plane.


Contains

Contains(theP, theLinearTolerance): boolean

Check if the checkpoint is on the plane.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Points that need to be checked
The LinearTolerancenumberLinear tolerance is used to determine whether a point is on a plane

Returns

boolean

If the point is on a plane, return true; Otherwise, return false.


Direct

Direct(): boolean

Check if the plane is in a right-handed coordinate system.

Returns

boolean

If the plane is a right-handed coordinate system, return true; Otherwise, return false.


DistanceToPlane

DistanceToPlane(theOther): number

Calculate the distance between two planes.

Parameters

NameTypeDescription
theOther[Mx3dGePlane] (Mx3dGePlane. md)Another planar object

Returns

number

The distance value between two planes.


DistanceToPoint

DistanceToPoint(theP): number

Calculate the distance from a point to a plane.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Points that require distance calculation

Returns

number

The distance value from the point to the plane.


Location

Location(): Mx3dGePoint

Obtain the position point on the plane.

Returns

Mx3dGePoint

Point objects on a plane.


MirrorByAxis

MirrorByAxis(theA1): void

Mirror the plane through the specified axis.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

void


MirrorByCSYSR

MirrorByCSYSR(theA2): void

Mirror the plane through the specified coordinate system.

Parameters

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Mirror coordinate system

Returns

void


MirrorByPoint

MirrorByPoint(theP): void

Mirror the plane through a specified point.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

void


MirroredByAxis

MirroredByAxis(theA1): Mx3dGePlane

Return the mirrored plane object (by specifying the axis).

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

Mx3dGePlane

The mirrored planar object.


MirroredByCSYSR

MirroredByCSYSR(theA2): Mx3dGePlane

Return the mirrored plane object (by specifying the coordinate system).

Parameters

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Mirror coordinate system

Returns

Mx3dGePlane

The mirrored planar object.


MirroredByPoint

MirroredByPoint(theP): Mx3dGePlane

Return the mirrored plane object (by specifying a point).

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

Mx3dGePlane

The mirrored planar object.


Position

Position(): Mx3dGeCSYS

Obtain the coordinate system position of the plane.

Returns

Mx3dGeCSYS

The coordinate system object of a plane.


Rotate

Rotate(theA1, theAng): void

Rotate the plane around the specified axis.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngNumberRotation angle

Returns

void


Rotated

Rotated(theA1, theAng): Mx3dGePlane

Return the rotated planar object.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngNumberRotation angle

Returns

Mx3dGePlane

The rotated planar object.


Scale

Scale(theP, theS): void

Scale the plane to a specified point and scale.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom point
TheSNumberScale ratio

Returns

void


Scaled

Scaled(theP, theS): Mx3dGePlane

Return the scaled planar object.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom point
TheSNumberScale ratio

Returns

Mx3dGePlane

The scaled planar object.


SetAxis

SetAxis(theA1): void

Set the axis of the plane.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Plane axial object

Returns

void


SetLocation

SetLocation(theLoc): void

Set the position of the plane.

Parameters

NameTypeDescription
TheLoc[Mx3dGePoint. md]A point on a plane used to define the specific position of the plane

Returns

void


SetPosition

SetPosition(theA3): void

Set the position and orientation of the plane.

Parameters

NameTypeDescription
TheA3[Mx3dGeCSYS] (Mx3dGeCSYS. md)Used to set the coordinate system for plane position and orientation

Returns

void


Shape

Shape(): Mx3dShapeObject

Obtain the topological shape of the plane.

Returns

Mx3dShapeObject

Flat shaped object.

Shape(UMin, UMax, VMin, VMax): Mx3dShapeObject

Obtain the topological shape of the plane within the specified range.

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

Returns

Mx3dShapeObject

Flat shaped object.


SquareDistanceToPlane

SquareDistanceToPlane(theOther): number

Calculate the square distance between two planes.

Parameters

NameTypeDescription
theOther[Mx3dGePlane] (Mx3dGePlane. md)Another planar object

Returns

number

The square distance value between two planes.


SquareDistanceToPoint

SquareDistanceToPoint(theP): number

Calculate the square distance from a point to a plane.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Points that require square distance calculation

Returns

number

The square distance value from a point to a plane.


Transform

Transform(theT): void

Apply transformations to the plane.

Parameters

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transform matrix

Returns

void


Transformed

Transformed(theT): Mx3dGePlane

Return the transformed planar object.

Parameters

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transform matrix

Returns

Mx3dGePlane

The transformed planar object.


TranslateBy2Points

TranslateBy2Points(theP1, theP2): void

Translate the plane through two points.

Parameters

NameTypeDescription
TheP1[Mx3dGePoint] (Mx3dGePoint. md)The first point
TheP2[Mx3dGePoint] (Mx3dGePoint. md)Second point

Returns

void


TranslateByVec

TranslateByVec(theV): void

Translate the plane along the specified vector.

Parameters

NameTypeDescription
TheV[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

void


TranslatedBy2Points

TranslatedBy2Points(theP1, theP2): Mx3dGePlane

Return the planar object after two-point translation.

Parameters

NameTypeDescription
TheP1[Mx3dGePoint] (Mx3dGePoint. md)The first point
TheP2[Mx3dGePoint] (Mx3dGePoint. md)Second point

Returns

Mx3dGePlane

Translated planar object.


TranslatedByVec

TranslatedByVec(theV): Mx3dGePlane

Return the translated planar object.

Parameters

NameTypeDescription
TheV[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

Mx3dGePlane

Translated planar object.


UReverse

UReverse(): void

Reverse the U direction.

Returns

void


VReverse

VReverse(): void

Reverse the direction of V.

Returns

void


XAxis

XAxis(): Mx3dGeAxis

Obtain the direction of the plane's X-axis.

Returns

Mx3dGeAxis

The axial object of the plane X-axis.


YAxis

YAxis(): Mx3dGeAxis

Obtain the direction of the Y-axis of the plane.

Returns

Mx3dGeAxis

The axial object of the plane Y-axis.