Open CASCADE Technology  7.5.0
Public Member Functions
gp_Pln Class Reference

Describes a plane. A plane is positioned in space with a coordinate system (a gp_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 gp_Pln plane is converted into a Geom_Plane plane, some implicit properties of its local coordinate system are used explicitly: More...

#include <gp_Pln.hxx>

Public Member Functions

 gp_Pln ()
 Creates a plane coincident with OXY plane of the reference coordinate system. More...
 
 gp_Pln (const gp_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. More...
 
 gp_Pln (const gp_Pnt &P, const gp_Dir &V)
 Creates a plane with the "Location" point. More...
 
 gp_Pln (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real 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. More...
 
void Coefficients (Standard_Real &A, Standard_Real &B, Standard_Real &C, Standard_Real &D) const
 Returns the coefficients of the plane's cartesian equation : A * X + B * Y + C * Z + D = 0. More...
 
void SetAxis (const gp_Ax1 &A1)
 Modifies this plane, by redefining its local coordinate system so that. More...
 
void SetLocation (const gp_Pnt &Loc)
 Changes the origin of the plane. More...
 
void SetPosition (const gp_Ax3 &A3)
 Changes the local coordinate system of the plane. More...
 
void UReverse ()
 Reverses the U parametrization of the plane reversing the XAxis. More...
 
void VReverse ()
 Reverses the V parametrization of the plane reversing the YAxis. More...
 
Standard_Boolean Direct () const
 returns true if the Ax3 is right handed. More...
 
const gp_Ax1Axis () const
 Returns the plane's normal Axis. More...
 
const gp_PntLocation () const
 Returns the plane's location (origin). More...
 
const gp_Ax3Position () const
 Returns the local coordinate system of the plane . More...
 
Standard_Real Distance (const gp_Pnt &P) const
 Computes the distance between <me> and the point. More...
 
Standard_Real Distance (const gp_Lin &L) const
 Computes the distance between <me> and the line <L>. More...
 
Standard_Real Distance (const gp_Pln &Other) const
 Computes the distance between two planes. More...
 
Standard_Real SquareDistance (const gp_Pnt &P) const
 Computes the square distance between <me> and the point. More...
 
Standard_Real SquareDistance (const gp_Lin &L) const
 Computes the square distance between <me> and the line <L>. More...
 
Standard_Real SquareDistance (const gp_Pln &Other) const
 Computes the square distance between two planes. More...
 
gp_Ax1 XAxis () const
 Returns the X axis of the plane. More...
 
gp_Ax1 YAxis () const
 Returns the Y axis of the plane. More...
 
Standard_Boolean Contains (const gp_Pnt &P, const Standard_Real LinearTolerance) const
 Returns true if this plane contains the point P. This means that. More...
 
Standard_Boolean Contains (const gp_Lin &L, const Standard_Real LinearTolerance, const Standard_Real AngularTolerance) const
 Returns true if this plane contains the line L. This means that. More...
 
void Mirror (const gp_Pnt &P)
 
gp_Pln Mirrored (const gp_Pnt &P) const
 Performs the symmetrical transformation of a plane with respect to the point. More...
 
void Mirror (const gp_Ax1 &A1)
 
gp_Pln Mirrored (const gp_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. More...
 
void Mirror (const gp_Ax2 &A2)
 
gp_Pln Mirrored (const gp_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. More...
 
void Rotate (const gp_Ax1 &A1, const Standard_Real Ang)
 
gp_Pln Rotated (const gp_Ax1 &A1, const Standard_Real Ang) const
 rotates a plane. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians. More...
 
void Scale (const gp_Pnt &P, const Standard_Real S)
 
gp_Pln Scaled (const gp_Pnt &P, const Standard_Real S) const
 Scales a plane. S is the scaling value. More...
 
void Transform (const gp_Trsf &T)
 
gp_Pln Transformed (const gp_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. More...
 
void Translate (const gp_Vec &V)
 
gp_Pln Translated (const gp_Vec &V) const
 Translates a plane in the direction of the vector V. The magnitude of the translation is the vector's magnitude. More...
 
void Translate (const gp_Pnt &P1, const gp_Pnt &P2)
 
gp_Pln Translated (const gp_Pnt &P1, const gp_Pnt &P2) const
 Translates a plane from the point P1 to the point P2. More...
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 

Detailed Description

Describes a plane. A plane is positioned in space with a coordinate system (a gp_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 gp_Pln plane is converted into a Geom_Plane plane, some implicit properties of its local coordinate system are used explicitly:

Constructor & Destructor Documentation

◆ gp_Pln() [1/4]

gp_Pln::gp_Pln ( )

Creates a plane coincident with OXY plane of the reference coordinate system.

◆ gp_Pln() [2/4]

gp_Pln::gp_Pln ( const gp_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.

◆ gp_Pln() [3/4]

gp_Pln::gp_Pln ( const gp_Pnt P,
const gp_Dir V 
)

Creates a plane with the "Location" point.

and the normal direction <V>.

◆ gp_Pln() [4/4]

gp_Pln::gp_Pln ( const Standard_Real  A,
const Standard_Real  B,
const Standard_Real  C,
const Standard_Real  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 gp_Ax1& gp_Pln::Axis ( ) const

Returns the plane's normal Axis.

◆ Coefficients()

void gp_Pln::Coefficients ( Standard_Real A,
Standard_Real B,
Standard_Real C,
Standard_Real D 
) const

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

◆ Contains() [1/2]

Standard_Boolean gp_Pln::Contains ( const gp_Pnt P,
const Standard_Real  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]

Standard_Boolean gp_Pln::Contains ( const gp_Lin L,
const Standard_Real  LinearTolerance,
const Standard_Real  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()

Standard_Boolean gp_Pln::Direct ( ) const

returns true if the Ax3 is right handed.

◆ Distance() [1/3]

Standard_Real gp_Pln::Distance ( const gp_Pnt P) const

Computes the distance between <me> and the point.

.

◆ Distance() [2/3]

Standard_Real gp_Pln::Distance ( const gp_Lin L) const

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

◆ Distance() [3/3]

Standard_Real gp_Pln::Distance ( const gp_Pln Other) const

Computes the distance between two planes.

◆ DumpJson()

void gp_Pln::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const

Dumps the content of me into the stream.

◆ Location()

const gp_Pnt& gp_Pln::Location ( ) const

Returns the plane's location (origin).

◆ Mirror() [1/3]

void gp_Pln::Mirror ( const gp_Pnt P)

◆ Mirror() [2/3]

void gp_Pln::Mirror ( const gp_Ax1 A1)

◆ Mirror() [3/3]

void gp_Pln::Mirror ( const gp_Ax2 A2)

◆ Mirrored() [1/3]

gp_Pln gp_Pln::Mirrored ( const gp_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]

gp_Pln gp_Pln::Mirrored ( const gp_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]

gp_Pln gp_Pln::Mirrored ( const gp_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 gp_Ax3& gp_Pln::Position ( ) const

Returns the local coordinate system of the plane .

◆ Rotate()

void gp_Pln::Rotate ( const gp_Ax1 A1,
const Standard_Real  Ang 
)

◆ Rotated()

gp_Pln gp_Pln::Rotated ( const gp_Ax1 A1,
const Standard_Real  Ang 
) const

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

◆ Scale()

void gp_Pln::Scale ( const gp_Pnt P,
const Standard_Real  S 
)

◆ Scaled()

gp_Pln gp_Pln::Scaled ( const gp_Pnt P,
const Standard_Real  S 
) const

Scales a plane. S is the scaling value.

◆ SetAxis()

void gp_Pln::SetAxis ( const gp_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 gp_Pln::SetLocation ( const gp_Pnt Loc)

Changes the origin of the plane.

◆ SetPosition()

void gp_Pln::SetPosition ( const gp_Ax3 A3)

Changes the local coordinate system of the plane.

◆ SquareDistance() [1/3]

Standard_Real gp_Pln::SquareDistance ( const gp_Pnt P) const

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

.

◆ SquareDistance() [2/3]

Standard_Real gp_Pln::SquareDistance ( const gp_Lin L) const

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

◆ SquareDistance() [3/3]

Standard_Real gp_Pln::SquareDistance ( const gp_Pln Other) const

Computes the square distance between two planes.

◆ Transform()

void gp_Pln::Transform ( const gp_Trsf T)

◆ Transformed()

gp_Pln gp_Pln::Transformed ( const gp_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 gp_Pln::Translate ( const gp_Vec V)

◆ Translate() [2/2]

void gp_Pln::Translate ( const gp_Pnt P1,
const gp_Pnt P2 
)

◆ Translated() [1/2]

gp_Pln gp_Pln::Translated ( const gp_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]

gp_Pln gp_Pln::Translated ( const gp_Pnt P1,
const gp_Pnt P2 
) const

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

◆ UReverse()

void gp_Pln::UReverse ( )

Reverses the U parametrization of the plane reversing the XAxis.

◆ VReverse()

void gp_Pln::VReverse ( )

Reverses the V parametrization of the plane reversing the YAxis.

◆ XAxis()

gp_Ax1 gp_Pln::XAxis ( ) const

Returns the X axis of the plane.

◆ YAxis()

gp_Ax1 gp_Pln::YAxis ( ) const

Returns the Y axis of the plane.


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