OpenLexocad  27.1
Geom::Pln Class Reference

#include <Pln.h>

Public Member Functions

 Pln ()
 Creates an indefinite plane.
More...
 
 Pln (const Geom::Ax3 &A3)
 
 Pln (const Geom::Pnt &P, const Geom::Dir &V)
 
 Pln (const double A, const double B, const double C, const double D)
 
void coefficients (double &A, double &B, double &C, double &D) const
 
void setAxis (const Geom::Ax1 &A1)
 
void setLocation (const Geom::Pnt &Loc)
 Changes the origin of the plane.
More...
 
void setPosition (const Geom::Ax3 &A3)
 Changes the local coordinate system of the plane.
More...
 
void uReverse ()
 
void vReverse ()
 
bool direct () const
 returns true if the Ax3 is right handed.
More...
 
const Geom::Ax1axis () const
 Returns the plane's normal Axis.
More...
 
const Geom::Pntlocation () const
 Returns the plane's location (origin).
More...
 
const Geom::Ax3position () const
 Returns the local coordinate system of the plane .
More...
 
double distance (const Geom::Pnt &P) const
 Computes the distance between <me> and the point. More...
 
double signeddistance (const Geom::Pnt &P) const
 Computes the signed distance between <me> and the point. More...
 
double distance (const Geom::Lin &L) const
 Computes the distance between <me> and the line <L>.
More...
 
double distance (const Pln &Other) const
 Computes the distance between two planes.
More...
 
double squareDistance (const Geom::Pnt &P) const
 Computes the square distance between <me> and the point. More...
 
double squareDistance (const Geom::Lin &L) const
 Computes the square distance between <me> and the line <L>.
More...
 
double squareDistance (const Pln &Other) const
 Computes the square distance between two planes.
More...
 
Geom::Ax1 xAxis () const
 Returns the X axis of the plane.
More...
 
Geom::Ax1 yAxis () const
 Returns the Y axis of the plane.
More...
 
bool contains (const Geom::Pnt &P, const double LinearTolerance) const
 
bool contains (const Geom::Lin &L, const double LinearTolerance, const double AngularTolerance) const
 
void mirror (const Geom::Pnt &P)
 
Pln mirrored (const Geom::Pnt &P) const
 
void mirror (const Geom::Ax1 &A1)
 
Pln mirrored (const Geom::Ax1 &A1) const
 
void mirror (const Geom::Ax2 &A2)
 
Pln mirrored (const Geom::Ax2 &A2) const
 
void rotate (const Geom::Ax1 &A1, const double Ang)
 
Pln rotated (const Geom::Ax1 &A1, const double Ang) const
 
void scale (const Geom::Pnt &P, const double S)
 
Pln scaled (const Geom::Pnt &P, const double S) const
 Scales a plane. S is the scaling value.
More...
 
void transform (const Geom::Trsf &T)
 
Pln transformed (const Geom::Trsf &T) const
 
void translate (const Geom::Vec &V)
 
Pln translated (const Geom::Vec &V) const
 
void translate (const Geom::Pnt &P1, const Geom::Pnt &P2)
 
Pln translated (const Geom::Pnt &P1, const Geom::Pnt &P2) const
 Translates a plane from the point P1 to the point P2.
More...
 

Detailed Description

Describes a plane.
A plane is positioned in space with a coordinate system
(a Geom::Ax3 object), such that the plane is defined by the
origin, "X Direction" and "Y Direction" of this coordinate
system, which is the "local coordinate system" of the
plane. The "main Direction" of the coordinate system is a
vector normal to the plane. It gives the plane an implicit
orientation such that the plane is said to be "direct", if the
coordinate system is right-handed, or "indirect" in the other case.
Note: when a Pln plane is converted into a
Geom_Plane plane, some implicit properties of its local
coordinate system are used explicitly:

  • its origin defines the origin of the two parameters of
    the planar surface,
  • its implicit orientation is also that of the Geom_Plane.
    See Also
    gce_MakePln which provides functions for more complex
    plane constructions
    Geom_Plane which provides additional functions for
    constructing planes and works, in particular, with the
    parametric equations of planes

Constructor & Destructor Documentation

◆ Pln() [1/4]

Geom::Pln::Pln ( )

Creates an indefinite plane.

◆ Pln() [2/4]

Geom::Pln::Pln ( const Geom::Ax3 A3)

The coordinate system of the plane is defined with the axis
placement A3.
The "Direction" of A3 defines the normal to the plane.
The "Location" of A3 defines the location (origin) of the plane.
The "XDirection" and "YDirection" of A3 define the "XAxis" and
the "YAxis" of the plane used to parametrize the plane.

◆ Pln() [3/4]

Geom::Pln::Pln ( const Geom::Pnt P,
const Geom::Dir V 
)

Creates a plane with the "Location" point


and the normal direction <V>.

◆ Pln() [4/4]

Geom::Pln::Pln ( const double  A,
const double  B,
const double  C,
const double  D 
)

Creates a plane from its cartesian equation :
A * X + B * Y + C * Z + D = 0.0
Raises ConstructionError if Sqrt (A*A + B*B + C*C) <= Resolution from gp.

Member Function Documentation

◆ axis()

const Geom::Ax1& Geom::Pln::axis ( ) const

Returns the plane's normal Axis.

◆ coefficients()

void Geom::Pln::coefficients ( double &  A,
double &  B,
double &  C,
double &  D 
) const

Returns the coefficients of the plane's cartesian equation :
A * X + B * Y + C * Z + D = 0.

◆ contains() [1/2]

bool Geom::Pln::contains ( const Geom::Pnt P,
const double  LinearTolerance 
) const

Returns true if this plane contains the point P. This means that

  • the distance between point P and this plane is less
    than or equal to LinearTolerance, or
  • line L is normal to the "main Axis" of the local
    coordinate system of this plane, within the tolerance
    AngularTolerance, and the distance between the origin
    of line L and this plane is less than or equal to
    LinearTolerance.

◆ contains() [2/2]

bool Geom::Pln::contains ( const Geom::Lin L,
const double  LinearTolerance,
const double  AngularTolerance 
) const

Returns true if this plane contains the line L. This means that

  • the distance between point P and this plane is less
    than or equal to LinearTolerance, or
  • line L is normal to the "main Axis" of the local
    coordinate system of this plane, within the tolerance
    AngularTolerance, and the distance between the origin
    of line L and this plane is less than or equal to
    LinearTolerance.

◆ direct()

bool Geom::Pln::direct ( ) const

returns true if the Ax3 is right handed.

◆ distance() [1/3]

double Geom::Pln::distance ( const Geom::Pnt P) const

Computes the distance between <me> and the point.

.

◆ distance() [2/3]

double Geom::Pln::distance ( const Geom::Lin L) const

Computes the distance between <me> and the line <L>.

◆ distance() [3/3]

double Geom::Pln::distance ( const Pln Other) const

Computes the distance between two planes.

◆ location()

const Geom::Pnt& Geom::Pln::location ( ) const

Returns the plane's location (origin).

◆ mirror() [1/3]

void Geom::Pln::mirror ( const Geom::Pnt P)

◆ mirror() [2/3]

void Geom::Pln::mirror ( const Geom::Ax1 A1)

◆ mirror() [3/3]

void Geom::Pln::mirror ( const Geom::Ax2 A2)

◆ mirrored() [1/3]

Pln Geom::Pln::mirrored ( const Geom::Pnt P) const

Performs the symmetrical transformation of a plane with respect
to the point

which is the center of the symmetry
Warnings :
The normal direction to the plane is not changed.
The "XAxis" and the "YAxis" are reversed.

◆ mirrored() [2/3]

Pln Geom::Pln::mirrored ( const Geom::Ax1 A1) const

Performs the symmetrical transformation of a
plane with respect to an axis placement which is the axis
of the symmetry. The transformation is performed on the
"Location" point, on the "XAxis" and the "YAxis". The
resulting normal direction is the cross product between
the "XDirection" and the "YDirection" after transformation
if the initial plane was right handed, else it is the
opposite.

◆ mirrored() [3/3]

Pln Geom::Pln::mirrored ( const Geom::Ax2 A2) const

Performs the symmetrical transformation of a
plane with respect to an axis placement. The axis
placement <A2> locates the plane of the symmetry. The
transformation is performed on the "Location" point, on
the "XAxis" and the "YAxis". The resulting normal
direction is the cross product between the "XDirection"
and the "YDirection" after transformation if the initial
plane was right handed, else it is the opposite.

◆ position()

const Geom::Ax3& Geom::Pln::position ( ) const

Returns the local coordinate system of the plane .

◆ rotate()

void Geom::Pln::rotate ( const Geom::Ax1 A1,
const double  Ang 
)

◆ rotated()

Pln Geom::Pln::rotated ( const Geom::Ax1 A1,
const double  Ang 
) const

rotates a plane. A1 is the axis of the rotation.
Ang is the angular value of the rotation in radians.

◆ scale()

void Geom::Pln::scale ( const Geom::Pnt P,
const double  S 
)

◆ scaled()

Pln Geom::Pln::scaled ( const Geom::Pnt P,
const double  S 
) const

Scales a plane. S is the scaling value.

◆ setAxis()

void Geom::Pln::setAxis ( const Geom::Ax1 A1)

Modifies this plane, by redefining its local coordinate system so that

  • its origin and "main Direction" become those of the
    axis A1 (the "X Direction" and "Y Direction" are then recomputed).
    Raises ConstructionError if the A1 is parallel to the "XAxis" of the plane.

◆ setLocation()

void Geom::Pln::setLocation ( const Geom::Pnt Loc)

Changes the origin of the plane.

◆ setPosition()

void Geom::Pln::setPosition ( const Geom::Ax3 A3)

Changes the local coordinate system of the plane.

◆ signeddistance()

double Geom::Pln::signeddistance ( const Geom::Pnt P) const

Computes the signed distance between <me> and the point.

.

◆ squareDistance() [1/3]

double Geom::Pln::squareDistance ( const Geom::Pnt P) const

Computes the square distance between <me> and the point.

.

◆ squareDistance() [2/3]

double Geom::Pln::squareDistance ( const Geom::Lin L) const

Computes the square distance between <me> and the line <L>.

◆ squareDistance() [3/3]

double Geom::Pln::squareDistance ( const Pln Other) const

Computes the square distance between two planes.

◆ transform()

void Geom::Pln::transform ( const Geom::Trsf T)

◆ transformed()

Pln Geom::Pln::transformed ( const Geom::Trsf T) const

Transforms a plane with the transformation T from class Trsf.
The transformation is performed on the "Location"
point, on the "XAxis" and the "YAxis".
The resulting normal direction is the cross product between
the "XDirection" and the "YDirection" after transformation.

◆ translate() [1/2]

void Geom::Pln::translate ( const Geom::Vec V)

◆ translate() [2/2]

void Geom::Pln::translate ( const Geom::Pnt P1,
const Geom::Pnt P2 
)

◆ translated() [1/2]

Pln Geom::Pln::translated ( const Geom::Vec V) const

Translates a plane in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.

◆ translated() [2/2]

Pln Geom::Pln::translated ( const Geom::Pnt P1,
const Geom::Pnt P2 
) const

Translates a plane from the point P1 to the point P2.

◆ uReverse()

void Geom::Pln::uReverse ( )

Reverses the U parametrization of the plane
reversing the XAxis.

◆ vReverse()

void Geom::Pln::vReverse ( )

Reverses the V parametrization of the plane
reversing the YAxis.

◆ xAxis()

Geom::Ax1 Geom::Pln::xAxis ( ) const

Returns the X axis of the plane.

◆ yAxis()

Geom::Ax1 Geom::Pln::yAxis ( ) const

Returns the Y axis of the plane.


The documentation for this class was generated from the following file: