OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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

    constexpr gp_Pln () noexcept=default
     Creates a plane coincident with OXY plane of the reference coordinate system.
    constexpr gp_Pln (const gp_Ax3 &theA3) noexcept
     The coordinate system of the plane is defined with the axis placement theA3. The "Direction" of theA3 defines the normal to the plane. The "Location" of theA3 defines the location (origin) of the plane. The "XDirection" and "YDirection" of theA3 define the "XAxis" and the "YAxis" of the plane used to parametrize the plane.
     gp_Pln (const gp_Pnt &theP, const gp_Dir &theV)
     Creates a plane with the "Location" point <theP> and the normal direction <theV>.
     gp_Pln (const double theA, const double theB, const double theC, const double theD)
     Creates a plane from its cartesian equation :
    void Coefficients (double &theA, double &theB, double &theC, double &theD) const noexcept
     Returns the coefficients of the plane's cartesian equation:
    void SetAxis (const gp_Ax1 &theA1)
     Modifies this plane, by redefining its local coordinate system so that.
    constexpr void SetLocation (const gp_Pnt &theLoc) noexcept
     Changes the origin of the plane.
    constexpr void SetPosition (const gp_Ax3 &theA3) noexcept
     Changes the local coordinate system of the plane.
    constexpr void UReverse () noexcept
     Reverses the U parametrization of the plane reversing the XAxis.
    constexpr void VReverse () noexcept
     Reverses the V parametrization of the plane reversing the YAxis.
    constexpr bool Direct () const
     Returns true if the Ax3 is right handed.
    constexpr const gp_Ax1Axis () const noexcept
     Returns the plane's normal Axis.
    constexpr const gp_PntLocation () const noexcept
     Returns the plane's location (origin).
    constexpr const gp_Ax3Position () const noexcept
     Returns the local coordinate system of the plane.
    double Distance (const gp_Pnt &theP) const noexcept
     Computes the distance between <me> and the point <theP>.
    double Distance (const gp_Lin &theL) const noexcept
     Computes the distance between <me> and the line <theL>.
    double Distance (const gp_Pln &theOther) const noexcept
     Computes the distance between two planes.
    double SignedDistance (const gp_Pnt &theP) const noexcept
     Computes the signed distance between <me> and the point <theP>. The sign of the distance indicates on which side of the plane the point is located:
    double SignedDistance (const gp_Lin &theL) const noexcept
     Computes the signed distance between <me> and the line <theL>. The sign of the distance indicates on which side of the plane the line is located:
    double SignedDistance (const gp_Pln &theOther) const noexcept
     Computes the signed distance between two planes. The sign of the distance indicates on which side of <me> the other plane is located:
    double SquareDistance (const gp_Pnt &theP) const noexcept
     Computes the square distance between <me> and the point <theP>.
    double SquareDistance (const gp_Lin &theL) const noexcept
     Computes the square distance between <me> and the line <theL>.
    double SquareDistance (const gp_Pln &theOther) const noexcept
     Computes the square distance between two planes.
    constexpr gp_Ax1 XAxis () const noexcept
     Returns the X axis of the plane.
    constexpr gp_Ax1 YAxis () const noexcept
     Returns the Y axis of the plane.
    bool Contains (const gp_Pnt &theP, const double theLinearTolerance) const noexcept
     Returns true if this plane contains the point theP. This means that.
    bool Contains (const gp_Lin &theL, const double theLinearTolerance, const double theAngularTolerance) const noexcept
     Returns true if this plane contains the line theL. This means that.
    void Mirror (const gp_Pnt &theP) noexcept
    gp_Pln Mirrored (const gp_Pnt &theP) const noexcept
     Performs the symmetrical transformation of a plane with respect to the point <theP> which is the center of the symmetry Warnings : The normal direction to the plane is not changed. The "XAxis" and the "YAxis" are reversed.
    void Mirror (const gp_Ax1 &theA1) noexcept
    gp_Pln Mirrored (const gp_Ax1 &theA1) const noexcept
     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.
    void Mirror (const gp_Ax2 &theA2) noexcept
    gp_Pln Mirrored (const gp_Ax2 &theA2) const noexcept
     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.
    void Rotate (const gp_Ax1 &theA1, const double theAng)
    gp_Pln Rotated (const gp_Ax1 &theA1, const double theAng) const
     Rotates a plane. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
    void Scale (const gp_Pnt &theP, const double theS)
    gp_Pln Scaled (const gp_Pnt &theP, const double theS) const
     Scales a plane. theS is the scaling value.
    void Transform (const gp_Trsf &theT)
    gp_Pln Transformed (const gp_Trsf &theT) const
     Transforms a plane with the transformation theT 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.
    constexpr void Translate (const gp_Vec &theV) noexcept
    constexpr gp_Pln Translated (const gp_Vec &theV) const noexcept
     Translates a plane in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
    constexpr void Translate (const gp_Pnt &theP1, const gp_Pnt &theP2) noexcept
    constexpr gp_Pln Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const noexcept
     Translates a plane from the point theP1 to the point theP2.
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.

    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:

    • 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

    ◆ gp_Pln() [1/4]

    gp_Pln::gp_Pln ( )
    constexprdefaultnoexcept

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

    ◆ gp_Pln() [2/4]

    gp_Pln::gp_Pln ( const gp_Ax3 & theA3)
    inlineconstexprnoexcept

    The coordinate system of the plane is defined with the axis placement theA3. The "Direction" of theA3 defines the normal to the plane. The "Location" of theA3 defines the location (origin) of the plane. The "XDirection" and "YDirection" of theA3 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 & theP,
    const gp_Dir & theV )

    Creates a plane with the "Location" point <theP> and the normal direction <theV>.

    ◆ gp_Pln() [4/4]

    gp_Pln::gp_Pln ( const double theA,
    const double theB,
    const double theC,
    const double theD )

    Creates a plane from its cartesian equation :

    theA * X + theB * Y + theC * Z + theD = 0.0

    Raises ConstructionError if std::sqrt (theA*theA + theB*theB + theC*theC) <= Resolution from gp.

    Member Function Documentation

    ◆ Axis()

    const gp_Ax1 & gp_Pln::Axis ( ) const
    inlinenodiscardconstexprnoexcept

    Returns the plane's normal Axis.

    ◆ Coefficients()

    void gp_Pln::Coefficients ( double & theA,
    double & theB,
    double & theC,
    double & theD ) const
    inlinenoexcept

    Returns the coefficients of the plane's cartesian equation:

    theA * X + theB * Y + theC * Z + theD = 0.

    ◆ Contains() [1/2]

    bool gp_Pln::Contains ( const gp_Lin & theL,
    const double theLinearTolerance,
    const double theAngularTolerance ) const
    inlinenodiscardnoexcept

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

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

    ◆ Contains() [2/2]

    bool gp_Pln::Contains ( const gp_Pnt & theP,
    const double theLinearTolerance ) const
    inlinenodiscardnoexcept

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

    • the distance between point theP and this plane is less than or equal to theLinearTolerance, 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 theLinearTolerance.

    ◆ Direct()

    bool gp_Pln::Direct ( ) const
    inlinenodiscardconstexpr

    Returns true if the Ax3 is right handed.

    ◆ Distance() [1/3]

    double gp_Pln::Distance ( const gp_Lin & theL) const
    inlinenodiscardnoexcept

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

    ◆ Distance() [2/3]

    double gp_Pln::Distance ( const gp_Pln & theOther) const
    inlinenodiscardnoexcept

    Computes the distance between two planes.

    ◆ Distance() [3/3]

    double gp_Pln::Distance ( const gp_Pnt & theP) const
    inlinenodiscardnoexcept

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

    ◆ DumpJson()

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

    Dumps the content of me into the stream.

    ◆ Location()

    const gp_Pnt & gp_Pln::Location ( ) const
    inlinenodiscardconstexprnoexcept

    Returns the plane's location (origin).

    ◆ Mirror() [1/3]

    void gp_Pln::Mirror ( const gp_Ax1 & theA1)
    noexcept

    ◆ Mirror() [2/3]

    void gp_Pln::Mirror ( const gp_Ax2 & theA2)
    noexcept

    ◆ Mirror() [3/3]

    void gp_Pln::Mirror ( const gp_Pnt & theP)
    noexcept

    ◆ Mirrored() [1/3]

    gp_Pln gp_Pln::Mirrored ( const gp_Ax1 & theA1) const
    nodiscardnoexcept

    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() [2/3]

    gp_Pln gp_Pln::Mirrored ( const gp_Ax2 & theA2) const
    nodiscardnoexcept

    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.

    ◆ Mirrored() [3/3]

    gp_Pln gp_Pln::Mirrored ( const gp_Pnt & theP) const
    nodiscardnoexcept

    Performs the symmetrical transformation of a plane with respect to the point <theP> which is the center of the symmetry Warnings : The normal direction to the plane is not changed. The "XAxis" and the "YAxis" are reversed.

    ◆ Position()

    const gp_Ax3 & gp_Pln::Position ( ) const
    inlinenodiscardconstexprnoexcept

    Returns the local coordinate system of the plane.

    ◆ Rotate()

    void gp_Pln::Rotate ( const gp_Ax1 & theA1,
    const double theAng )
    inline

    ◆ Rotated()

    gp_Pln gp_Pln::Rotated ( const gp_Ax1 & theA1,
    const double theAng ) const
    inlinenodiscard

    Rotates a plane. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.

    ◆ Scale()

    void gp_Pln::Scale ( const gp_Pnt & theP,
    const double theS )
    inline

    ◆ Scaled()

    gp_Pln gp_Pln::Scaled ( const gp_Pnt & theP,
    const double theS ) const
    inlinenodiscard

    Scales a plane. theS is the scaling value.

    ◆ SetAxis()

    void gp_Pln::SetAxis ( const gp_Ax1 & theA1)
    inline

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

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

    ◆ SetLocation()

    void gp_Pln::SetLocation ( const gp_Pnt & theLoc)
    inlineconstexprnoexcept

    Changes the origin of the plane.

    ◆ SetPosition()

    void gp_Pln::SetPosition ( const gp_Ax3 & theA3)
    inlineconstexprnoexcept

    Changes the local coordinate system of the plane.

    ◆ SignedDistance() [1/3]

    double gp_Pln::SignedDistance ( const gp_Lin & theL) const
    inlinenodiscardnoexcept

    Computes the signed distance between <me> and the line <theL>. The sign of the distance indicates on which side of the plane the line is located:

    • positive sign: the line is located in the direction of the plane normal,
    • negative sign: the line is located in the opposite direction to the plane normal,
    • zero: the line intersects the plane.

    ◆ SignedDistance() [2/3]

    double gp_Pln::SignedDistance ( const gp_Pln & theOther) const
    inlinenodiscardnoexcept

    Computes the signed distance between two planes. The sign of the distance indicates on which side of <me> the other plane is located:

    • positive sign: the other plane is located in the direction of the plane normal,
    • negative sign: the other plane is located in the opposite direction to the plane normal,
    • zero: the planes intersect.

    ◆ SignedDistance() [3/3]

    double gp_Pln::SignedDistance ( const gp_Pnt & theP) const
    inlinenodiscardnoexcept

    Computes the signed distance between <me> and the point <theP>. The sign of the distance indicates on which side of the plane the point is located:

    • positive sign: the point is located in the direction of the plane normal,
    • negative sign: the point is located in the opposite direction to the plane normal,
    • zero: the point is located on the plane.

    ◆ SquareDistance() [1/3]

    double gp_Pln::SquareDistance ( const gp_Lin & theL) const
    inlinenodiscardnoexcept

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

    ◆ SquareDistance() [2/3]

    double gp_Pln::SquareDistance ( const gp_Pln & theOther) const
    inlinenodiscardnoexcept

    Computes the square distance between two planes.

    ◆ SquareDistance() [3/3]

    double gp_Pln::SquareDistance ( const gp_Pnt & theP) const
    inlinenodiscardnoexcept

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

    ◆ Transform()

    void gp_Pln::Transform ( const gp_Trsf & theT)
    inline

    ◆ Transformed()

    gp_Pln gp_Pln::Transformed ( const gp_Trsf & theT) const
    inlinenodiscard

    Transforms a plane with the transformation theT 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_Pnt & theP1,
    const gp_Pnt & theP2 )
    inlineconstexprnoexcept

    ◆ Translate() [2/2]

    void gp_Pln::Translate ( const gp_Vec & theV)
    inlineconstexprnoexcept

    ◆ Translated() [1/2]

    gp_Pln gp_Pln::Translated ( const gp_Pnt & theP1,
    const gp_Pnt & theP2 ) const
    inlinenodiscardconstexprnoexcept

    Translates a plane from the point theP1 to the point theP2.

    ◆ Translated() [2/2]

    gp_Pln gp_Pln::Translated ( const gp_Vec & theV) const
    inlinenodiscardconstexprnoexcept

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

    ◆ UReverse()

    void gp_Pln::UReverse ( )
    inlineconstexprnoexcept

    Reverses the U parametrization of the plane reversing the XAxis.

    ◆ VReverse()

    void gp_Pln::VReverse ( )
    inlineconstexprnoexcept

    Reverses the V parametrization of the plane reversing the YAxis.

    ◆ XAxis()

    gp_Ax1 gp_Pln::XAxis ( ) const
    inlinenodiscardconstexprnoexcept

    Returns the X axis of the plane.

    ◆ YAxis()

    gp_Ax1 gp_Pln::YAxis ( ) const
    inlinenodiscardconstexprnoexcept

    Returns the Y axis of the plane.


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