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_Pnt Class Reference

    Defines a 3D cartesian point. More...

    #include <gp_Pnt.hxx>

    Public Member Functions

    constexpr gp_Pnt () noexcept=default
     Creates a point with zero coordinates.
    constexpr gp_Pnt (const gp_XYZ &theCoord) noexcept
     Creates a point from a XYZ object.
    constexpr gp_Pnt (const double theXp, const double theYp, const double theZp) noexcept
     Creates a point with its 3 cartesian's coordinates: theXp, theYp, theZp.
    constexpr void SetCoord (const int theIndex, const double theXi)
     Changes the coordinate of range theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}.
    constexpr void SetCoord (const double theXp, const double theYp, const double theZp) noexcept
     For this point, assigns the values theXp, theYp and theZp to its three coordinates.
    constexpr void SetX (const double theX) noexcept
     Assigns the given value to the X coordinate of this point.
    constexpr void SetY (const double theY) noexcept
     Assigns the given value to the Y coordinate of this point.
    constexpr void SetZ (const double theZ) noexcept
     Assigns the given value to the Z coordinate of this point.
    constexpr void SetXYZ (const gp_XYZ &theCoord) noexcept
     Assigns the three coordinates of theCoord to this point.
    constexpr double Coord (const int theIndex) const
     Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}.
    constexpr void Coord (double &theXp, double &theYp, double &theZp) const noexcept
     For this point gives its three coordinates theXp, theYp and theZp.
    constexpr double X () const noexcept
     For this point, returns its X coordinate.
    constexpr double Y () const noexcept
     For this point, returns its Y coordinate.
    constexpr double Z () const noexcept
     For this point, returns its Z coordinate.
    constexpr const gp_XYZXYZ () const noexcept
     For this point, returns its three coordinates as a XYZ object.
    constexpr const gp_XYZCoord () const noexcept
     For this point, returns its three coordinates as a XYZ object.
    constexpr gp_XYZChangeCoord () noexcept
     Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
    constexpr void BaryCenter (const double theAlpha, const gp_Pnt &theP, const double theBeta)
     Assigns the result of the following expression to this point (theAlpha*this + theBeta*theP) / (theAlpha + theBeta).
    bool IsEqual (const gp_Pnt &theOther, const double theLinearTolerance) const
     Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.
    double Distance (const gp_Pnt &theOther) const
     Computes the distance between two points.
    constexpr double SquareDistance (const gp_Pnt &theOther) const noexcept
     Computes the square distance between two points.
    void Mirror (const gp_Pnt &theP) noexcept
     Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
    gp_Pnt Mirrored (const gp_Pnt &theP) const noexcept
     Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry.
    void Mirror (const gp_Ax1 &theA1) noexcept
    gp_Pnt Mirrored (const gp_Ax1 &theA1) const noexcept
     Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).
    void Mirror (const gp_Ax2 &theA2) noexcept
    gp_Pnt Mirrored (const gp_Ax2 &theA2) const noexcept
     Rotates a point. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
    void Rotate (const gp_Ax1 &theA1, const double theAng)
    gp_Pnt Rotated (const gp_Ax1 &theA1, const double theAng) const
    constexpr void Scale (const gp_Pnt &theP, const double theS) noexcept
     Scales a point. theS is the scaling value.
    constexpr gp_Pnt Scaled (const gp_Pnt &theP, const double theS) const noexcept
    void Transform (const gp_Trsf &theT)
     Transforms a point with the transformation T.
    gp_Pnt Transformed (const gp_Trsf &theT) const
    constexpr void Translate (const gp_Vec &theV) noexcept
     Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
    constexpr gp_Pnt Translated (const gp_Vec &theV) const noexcept
    constexpr void Translate (const gp_Pnt &theP1, const gp_Pnt &theP2) noexcept
     Translates a point from the point theP1 to the point theP2.
    constexpr gp_Pnt Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const noexcept
    void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
     Dumps the content of me into the stream.
    bool InitFromJson (const Standard_SStream &theSStream, int &theStreamPos)
     Inits the content of me from the stream.

    Detailed Description

    Defines a 3D cartesian point.

    Constructor & Destructor Documentation

    ◆ gp_Pnt() [1/3]

    gp_Pnt::gp_Pnt ( )
    constexprdefaultnoexcept

    Creates a point with zero coordinates.

    ◆ gp_Pnt() [2/3]

    gp_Pnt::gp_Pnt ( const gp_XYZ & theCoord)
    inlineconstexprnoexcept

    Creates a point from a XYZ object.

    ◆ gp_Pnt() [3/3]

    gp_Pnt::gp_Pnt ( const double theXp,
    const double theYp,
    const double theZp )
    inlineconstexprnoexcept

    Creates a point with its 3 cartesian's coordinates: theXp, theYp, theZp.

    Member Function Documentation

    ◆ BaryCenter()

    void gp_Pnt::BaryCenter ( const double theAlpha,
    const gp_Pnt & theP,
    const double theBeta )
    inlineconstexpr

    Assigns the result of the following expression to this point (theAlpha*this + theBeta*theP) / (theAlpha + theBeta).

    ◆ ChangeCoord()

    gp_XYZ & gp_Pnt::ChangeCoord ( )
    inlineconstexprnoexcept

    Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.

    ◆ Coord() [1/3]

    const gp_XYZ & gp_Pnt::Coord ( ) const
    inlineconstexprnoexcept

    For this point, returns its three coordinates as a XYZ object.

    ◆ Coord() [2/3]

    double gp_Pnt::Coord ( const int theIndex) const
    inlineconstexpr

    Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}.

    ◆ Coord() [3/3]

    void gp_Pnt::Coord ( double & theXp,
    double & theYp,
    double & theZp ) const
    inlineconstexprnoexcept

    For this point gives its three coordinates theXp, theYp and theZp.

    ◆ Distance()

    double gp_Pnt::Distance ( const gp_Pnt & theOther) const
    inline

    Computes the distance between two points.

    ◆ DumpJson()

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

    Dumps the content of me into the stream.

    ◆ InitFromJson()

    bool gp_Pnt::InitFromJson ( const Standard_SStream & theSStream,
    int & theStreamPos )

    Inits the content of me from the stream.

    ◆ IsEqual()

    bool gp_Pnt::IsEqual ( const gp_Pnt & theOther,
    const double theLinearTolerance ) const
    inline

    Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.

    ◆ Mirror() [1/3]

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

    ◆ Mirror() [2/3]

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

    ◆ Mirror() [3/3]

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

    Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.

    ◆ Mirrored() [1/3]

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

    Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).

    ◆ Mirrored() [2/3]

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

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

    ◆ Mirrored() [3/3]

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

    Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry.

    ◆ Rotate()

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

    ◆ Rotated()

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

    ◆ Scale()

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

    Scales a point. theS is the scaling value.

    ◆ Scaled()

    gp_Pnt gp_Pnt::Scaled ( const gp_Pnt & theP,
    const double theS ) const
    inlinenodiscardconstexprnoexcept

    ◆ SetCoord() [1/2]

    void gp_Pnt::SetCoord ( const double theXp,
    const double theYp,
    const double theZp )
    inlineconstexprnoexcept

    For this point, assigns the values theXp, theYp and theZp to its three coordinates.

    ◆ SetCoord() [2/2]

    void gp_Pnt::SetCoord ( const int theIndex,
    const double theXi )
    inlineconstexpr

    Changes the coordinate of range theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}.

    ◆ SetX()

    void gp_Pnt::SetX ( const double theX)
    inlineconstexprnoexcept

    Assigns the given value to the X coordinate of this point.

    ◆ SetXYZ()

    void gp_Pnt::SetXYZ ( const gp_XYZ & theCoord)
    inlineconstexprnoexcept

    Assigns the three coordinates of theCoord to this point.

    ◆ SetY()

    void gp_Pnt::SetY ( const double theY)
    inlineconstexprnoexcept

    Assigns the given value to the Y coordinate of this point.

    ◆ SetZ()

    void gp_Pnt::SetZ ( const double theZ)
    inlineconstexprnoexcept

    Assigns the given value to the Z coordinate of this point.

    ◆ SquareDistance()

    double gp_Pnt::SquareDistance ( const gp_Pnt & theOther) const
    inlineconstexprnoexcept

    Computes the square distance between two points.

    ◆ Transform()

    void gp_Pnt::Transform ( const gp_Trsf & theT)

    Transforms a point with the transformation T.

    ◆ Transformed()

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

    ◆ Translate() [1/2]

    void gp_Pnt::Translate ( const gp_Pnt & theP1,
    const gp_Pnt & theP2 )
    inlineconstexprnoexcept

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

    ◆ Translate() [2/2]

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

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

    ◆ Translated() [1/2]

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

    ◆ Translated() [2/2]

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

    ◆ X()

    double gp_Pnt::X ( ) const
    inlineconstexprnoexcept

    For this point, returns its X coordinate.

    ◆ XYZ()

    const gp_XYZ & gp_Pnt::XYZ ( ) const
    inlineconstexprnoexcept

    For this point, returns its three coordinates as a XYZ object.

    ◆ Y()

    double gp_Pnt::Y ( ) const
    inlineconstexprnoexcept

    For this point, returns its Y coordinate.

    ◆ Z()

    double gp_Pnt::Z ( ) const
    inlineconstexprnoexcept

    For this point, returns its Z coordinate.


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