OpenLexocad
28.0
|
#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::Ax1 & | axis () const |
Returns the plane's normal Axis. More... | |
const Geom::Pnt & | location () const |
Returns the plane's location (origin). More... | |
const Geom::Ax3 & | position () 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... | |
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:
Geom::Pln::Pln | ( | ) |
Creates an indefinite plane.
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.
Creates a plane with the "Location" point
and the normal direction <V>.
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.
const Geom::Ax1& Geom::Pln::axis | ( | ) | const |
Returns the plane's normal Axis.
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.
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
bool Geom::Pln::contains | ( | const Geom::Pnt & | P, |
const double | LinearTolerance | ||
) | const |
Returns true if this plane contains the point P. This means that
bool Geom::Pln::direct | ( | ) | const |
returns true if the Ax3 is right handed.
double Geom::Pln::distance | ( | const Geom::Lin & | L | ) | const |
Computes the distance between <me> and the line <L>.
double Geom::Pln::distance | ( | const Geom::Pnt & | P | ) | const |
Computes the distance between <me> and the point.
.
double Geom::Pln::distance | ( | const Pln & | Other | ) | const |
Computes the distance between two planes.
const Geom::Pnt& Geom::Pln::location | ( | ) | const |
Returns the plane's location (origin).
void Geom::Pln::mirror | ( | const Geom::Ax1 & | A1 | ) |
void Geom::Pln::mirror | ( | const Geom::Ax2 & | A2 | ) |
void Geom::Pln::mirror | ( | const Geom::Pnt & | P | ) |
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.
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.
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.
const Geom::Ax3& Geom::Pln::position | ( | ) | const |
Returns the local coordinate system of the plane .
void Geom::Pln::rotate | ( | const Geom::Ax1 & | A1, |
const double | Ang | ||
) |
rotates a plane. A1 is the axis of the rotation.
Ang is the angular value of the rotation in radians.
void Geom::Pln::scale | ( | const Geom::Pnt & | P, |
const double | S | ||
) |
Scales a plane. S is the scaling value.
void Geom::Pln::setAxis | ( | const Geom::Ax1 & | A1 | ) |
Modifies this plane, by redefining its local coordinate system so that
void Geom::Pln::setLocation | ( | const Geom::Pnt & | Loc | ) |
Changes the origin of the plane.
void Geom::Pln::setPosition | ( | const Geom::Ax3 & | A3 | ) |
Changes the local coordinate system of the plane.
double Geom::Pln::signeddistance | ( | const Geom::Pnt & | P | ) | const |
Computes the signed distance between <me> and the point.
.
double Geom::Pln::squareDistance | ( | const Geom::Lin & | L | ) | const |
Computes the square distance between <me> and the line <L>.
double Geom::Pln::squareDistance | ( | const Geom::Pnt & | P | ) | const |
Computes the square distance between <me> and the point.
.
double Geom::Pln::squareDistance | ( | const Pln & | Other | ) | const |
Computes the square distance between two planes.
void Geom::Pln::transform | ( | const Geom::Trsf & | T | ) |
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.
void Geom::Pln::translate | ( | const Geom::Vec & | V | ) |
Translates a plane from the point P1 to the point P2.
Translates a plane in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.
void Geom::Pln::uReverse | ( | ) |
Reverses the U parametrization of the plane
reversing the XAxis.
void Geom::Pln::vReverse | ( | ) |
Reverses the V parametrization of the plane
reversing the YAxis.
Geom::Ax1 Geom::Pln::xAxis | ( | ) | const |
Returns the X axis of the plane.
Geom::Ax1 Geom::Pln::yAxis | ( | ) | const |
Returns the Y axis of the plane.