Header menu logo Euclid

NPlane Type

An immutable un-parametrized plane defined by a point and a normal vector. As opposed to the PPlane this plane is not parametrized in a X, Y and Z direction. Note: Never use the struct default constructor NPlane() as it will create an invalid zero Plane. Use NPlane.create or Plane.createUnchecked instead.

Record fields

Record Field Description

Normal

Full Usage: Normal

Field type: UnitVec

The unitized normal of the Plane.

Field type: UnitVec

Origin

Full Usage: Origin

Field type: Pnt

The center point of the Plane.

Field type: Pnt

Instance members

Instance member Description

this.Angle90ToLine

Full Usage: this.Angle90ToLine

Parameters:
Returns: float
Modifiers: inline

Returns the angle to a Line3D in Degree, ignoring the normal's orientation. So 0.0 if the line is parallele to the Plane. And 90 degrees if the line is perpendicular to the plane.

ln : Line3D
Returns: float

this.Angle90ToPlane

Full Usage: this.Angle90ToPlane

Parameters:
Returns: float
Modifiers: inline

Returns the angle to another Plane in Degree, ignoring the normal's orientation. So 0.0 if the planes are parallel. And 90 degrees if the planes are perpendicular to ech other.

pl : NPlane
Returns: float

this.Angle90ToVec

Full Usage: this.Angle90ToVec

Parameters:
Returns: float
Modifiers: inline

Returns the angle to 3D unit-vector in Degree, ignoring the plane's orientation. So 0.0 if the vector is parallele to the Plane. And 90 degrees if the vector is perpendicular to the plane.

v : UnitVec
Returns: float

this.Angle90ToVec

Full Usage: this.Angle90ToVec

Parameters:
Returns: float
Modifiers: inline

Returns the angle to 3D vector in Degree, ignoring the plane's orientation. So 0.0 if the vector is parallele to the Plane. And 90 degrees if the vector is perpendicular to the plane.

v : Vec
Returns: float

this.ClosestPoint

Full Usage: this.ClosestPoint

Parameters:
Returns: Pnt
Modifiers: inline

Returns the closest point on the plane from a test point.

pt : Pnt
Returns: Pnt

this.DistanceToPt

Full Usage: this.DistanceToPt

Parameters:
Returns: float
Modifiers: inline

Returns signed distance of point to plane, also indicating on which side it is.

pt : Pnt
Returns: float

this.Flipped

Full Usage: this.Flipped

Returns: NPlane
Modifiers: inline

Returns a new Plane with the same Origin but flipped Normal.

Returns: NPlane

this.IsCoincidentTo

Full Usage: this.IsCoincidentTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two Planes are coincident within the distance tolerance. 1e-6 by default. This means that their Z-axes are parallel within the angle tolerance and the distance of second origin to the first plane is less than the distance tolerance. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Euclid.Cosine module.

other : NPlane
?distanceTolerance : float
?minCosine : MeasureProduct<cosine, MeasureOne>
Returns: bool

this.PlaneAtClPt

Full Usage: this.PlaneAtClPt

Parameters:
Returns: NPlane
Modifiers: inline

First finds the closet point on plane from a test point. Then returns a new plane with Origin at this point and the same Normal.

pt : Pnt
Returns: NPlane

Static members

Static member Description

NPlane.angleTo a b

Full Usage: NPlane.angleTo a b

Parameters:
Returns: float
Modifiers: inline

Returns the angle to another Plane in Degree, ignoring the normal's orientation. So between 0 to 90 degrees.

a : NPlane
b : NPlane
Returns: float

NPlane.areCoincident a b

Full Usage: NPlane.areCoincident a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D Planes are coincident. This means that the Z-axes are parallel within 0.25 degrees and the distance of second origin to the first plane is less than 1e-6 units tolerance.

a : NPlane
b : NPlane
Returns: bool

NPlane.create (pt, normal)

Full Usage: NPlane.create (pt, normal)

Parameters:
Returns: NPlane
Modifiers: inline

Create Plane from already normalized input vector.

pt : Pnt
normal : UnitVec
Returns: NPlane

NPlane.create (pt, normal)

Full Usage: NPlane.create (pt, normal)

Parameters:
Returns: NPlane

Create Plane, normal vector gets unitized in constructor.

pt : Pnt
normal : Vec
Returns: NPlane

NPlane.createFrom3Points a b c

Full Usage: NPlane.createFrom3Points a b c

Parameters:
Returns: NPlane
Modifiers: inline

Create Plane from 3 points.

a : Pnt
b : Pnt
c : Pnt
Returns: NPlane

NPlane.distToPt pt pl

Full Usage: NPlane.distToPt pt pl

Parameters:
Returns: float
Modifiers: inline

Returns signed distance of point to plane, also indicating on which side it is.

pt : Pnt
pl : NPlane
Returns: float

NPlane.doLinePlaneIntersect ln pl

Full Usage: NPlane.doLinePlaneIntersect ln pl

Parameters:
Returns: bool
Modifiers: inline

Checks if a finite Line3D intersects with Plane in one point. Returns false for parallel and coincident lines.

ln : Line3D
pl : NPlane
Returns: bool

NPlane.equals tol a b

Full Usage: NPlane.equals tol a b

Parameters:
Returns: bool

Checks if two 3D Planes are equal within tolerance. The same tolerance is used for the origin and the tips of the normal. Use a tolerance of 0.0 to check for an exact match.

tol : float
a : NPlane
b : NPlane
Returns: bool

NPlane.intersect a b

Full Usage: NPlane.intersect a b

Parameters:
Returns: Line3D option

Returns the line of intersection between two planes. Or None if they are parallel.

a : NPlane
b : NPlane
Returns: Line3D option

NPlane.intersectLine ln pl

Full Usage: NPlane.intersectLine ln pl

Parameters:
Returns: Pnt option

Returns intersection point of infinite Line3D with Plane. Or None if they are parallel.

ln : Line3D
pl : NPlane
Returns: Pnt option

NPlane.intersectLineParameter ln pl

Full Usage: NPlane.intersectLineParameter ln pl

Parameters:
Returns: float option

Returns the parameter of intersection point of infinite Line3D with Plane. Or None if they are parallel.

ln : Line3D
pl : NPlane
Returns: float option

NPlane.normal p

Full Usage: NPlane.normal p

Parameters:
Returns: UnitVec
Modifiers: inline

Gets the Planes normal. A unitized vector.

p : NPlane
Returns: UnitVec

NPlane.offset dist pl

Full Usage: NPlane.offset dist pl

Parameters:
Returns: NPlane
Modifiers: inline

Returns a new plane offset along the normal vector.

dist : float
pl : NPlane
Returns: NPlane

NPlane.offsetInDir dirPt dist pl

Full Usage: NPlane.offsetInDir dirPt dist pl

Parameters:
    dirPt : ^a
    dist : float
    pl : NPlane

Returns: NPlane
Modifiers: inline
Type parameters: ^a, ^b

Offset Plane by amount in orientation towards DirPt: In direction of point -> distance -> Plane.

dirPt : ^a
dist : float
pl : NPlane
Returns: NPlane

NPlane.origin a

Full Usage: NPlane.origin a

Parameters:
Returns: Pnt
Modifiers: inline

Gets the Planes origin.

a : NPlane
Returns: Pnt

NPlane.xyPlane

Full Usage: NPlane.xyPlane

Returns: NPlane
Modifiers: inline

Gets the Plane at world origin with normal in world Z direction.

Returns: NPlane

Type something to start searching.