Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
gp_Pnt2d Class Reference

Defines a non-persistent 2D cartesian point. More...

#include <gp_Pnt2d.hxx>

Public Member Functions

constexpr gp_Pnt2d () noexcept=default
 Creates a point with zero coordinates.
 
constexpr gp_Pnt2d (const gp_XY &theCoord) noexcept
 Creates a point with a doublet of coordinates.
 
constexpr gp_Pnt2d (const double theXp, const double theYp) noexcept
 Creates a point with its 2 cartesian's coordinates: theXp, theYp.
 
constexpr void SetCoord (const int theIndex, const double theXi)
 Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.
 
constexpr void SetCoord (const double theXp, const double theYp) noexcept
 For this point, assigns the values theXp and theYp to its two 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 SetXY (const gp_XY &theCoord) noexcept
 Assigns the two coordinates of Coord to this point.
 
constexpr double Coord (const int theIndex) const
 Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
 
constexpr void Coord (double &theXp, double &theYp) const noexcept
 For this point returns its two coordinates as a number pair.
 
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 const gp_XYXY () const noexcept
 For this point, returns its two coordinates as a number pair.
 
constexpr const gp_XYCoord () const noexcept
 For this point, returns its two coordinates as a number pair.
 
constexpr gp_XYChangeCoord () noexcept
 Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
 
bool IsEqual (const gp_Pnt2d &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_Pnt2d &theOther) const
 Computes the distance between two points.
 
constexpr double SquareDistance (const gp_Pnt2d &theOther) const noexcept
 Computes the square distance between two points.
 
void Mirror (const gp_Pnt2d &theP) noexcept
 Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
 
gp_Pnt2d Mirrored (const gp_Pnt2d &theP) const noexcept
 Performs the symmetrical transformation of a point with respect to an axis placement which is the axis.
 
void Mirror (const gp_Ax2d &theA) noexcept
 
gp_Pnt2d Mirrored (const gp_Ax2d &theA) const noexcept
 
void Rotate (const gp_Pnt2d &theP, const double theAng)
 Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
 
gp_Pnt2d Rotated (const gp_Pnt2d &theP, const double theAng) const
 
constexpr void Scale (const gp_Pnt2d &theP, const double theS) noexcept
 Scales a point. theS is the scaling value.
 
constexpr gp_Pnt2d Scaled (const gp_Pnt2d &theP, const double theS) const noexcept
 
void Transform (const gp_Trsf2d &theT) noexcept
 Transforms a point with the transformation theT.
 
gp_Pnt2d Transformed (const gp_Trsf2d &theT) const
 
constexpr void Translate (const gp_Vec2d &theV) noexcept
 Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
 
constexpr gp_Pnt2d Translated (const gp_Vec2d &theV) const noexcept
 
constexpr void Translate (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) noexcept
 Translates a point from the point theP1 to the point theP2.
 
constexpr gp_Pnt2d Translated (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) const noexcept
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 

Detailed Description

Defines a non-persistent 2D cartesian point.

Constructor & Destructor Documentation

◆ gp_Pnt2d() [1/3]

constexpr gp_Pnt2d::gp_Pnt2d ( )
constexprdefaultnoexcept

Creates a point with zero coordinates.

◆ gp_Pnt2d() [2/3]

constexpr gp_Pnt2d::gp_Pnt2d ( const gp_XY & theCoord)
inlineconstexprnoexcept

Creates a point with a doublet of coordinates.

◆ gp_Pnt2d() [3/3]

constexpr gp_Pnt2d::gp_Pnt2d ( const double theXp,
const double theYp )
inlineconstexprnoexcept

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

Member Function Documentation

◆ ChangeCoord()

constexpr gp_XY & gp_Pnt2d::ChangeCoord ( )
inlineconstexprnoexcept

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

◆ Coord() [1/3]

constexpr const gp_XY & gp_Pnt2d::Coord ( ) const
inlineconstexprnoexcept

For this point, returns its two coordinates as a number pair.

◆ Coord() [2/3]

constexpr double gp_Pnt2d::Coord ( const int theIndex) const
inlineconstexpr

Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.

◆ Coord() [3/3]

constexpr void gp_Pnt2d::Coord ( double & theXp,
double & theYp ) const
inlineconstexprnoexcept

For this point returns its two coordinates as a number pair.

◆ Distance()

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

Computes the distance between two points.

◆ DumpJson()

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

Dumps the content of me into the stream.

◆ IsEqual()

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

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

◆ Mirror() [1/2]

void gp_Pnt2d::Mirror ( const gp_Ax2d & theA)
noexcept

◆ Mirror() [2/2]

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

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

◆ Mirrored() [1/2]

gp_Pnt2d gp_Pnt2d::Mirrored ( const gp_Ax2d & theA) const
noexcept

◆ Mirrored() [2/2]

gp_Pnt2d gp_Pnt2d::Mirrored ( const gp_Pnt2d & theP) const
noexcept

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

◆ Rotate()

void gp_Pnt2d::Rotate ( const gp_Pnt2d & theP,
const double theAng )
inline

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

◆ Rotated()

gp_Pnt2d gp_Pnt2d::Rotated ( const gp_Pnt2d & theP,
const double theAng ) const
inline

◆ Scale()

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

Scales a point. theS is the scaling value.

◆ Scaled()

constexpr gp_Pnt2d gp_Pnt2d::Scaled ( const gp_Pnt2d & theP,
const double theS ) const
inlineconstexprnoexcept

◆ SetCoord() [1/2]

constexpr void gp_Pnt2d::SetCoord ( const double theXp,
const double theYp )
inlineconstexprnoexcept

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

◆ SetCoord() [2/2]

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

Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.

◆ SetX()

constexpr void gp_Pnt2d::SetX ( const double theX)
inlineconstexprnoexcept

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

◆ SetXY()

constexpr void gp_Pnt2d::SetXY ( const gp_XY & theCoord)
inlineconstexprnoexcept

Assigns the two coordinates of Coord to this point.

◆ SetY()

constexpr void gp_Pnt2d::SetY ( const double theY)
inlineconstexprnoexcept

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

◆ SquareDistance()

constexpr double gp_Pnt2d::SquareDistance ( const gp_Pnt2d & theOther) const
inlineconstexprnoexcept

Computes the square distance between two points.

◆ Transform()

void gp_Pnt2d::Transform ( const gp_Trsf2d & theT)
noexcept

Transforms a point with the transformation theT.

◆ Transformed()

gp_Pnt2d gp_Pnt2d::Transformed ( const gp_Trsf2d & theT) const
inline

◆ Translate() [1/2]

constexpr void gp_Pnt2d::Translate ( const gp_Pnt2d & theP1,
const gp_Pnt2d & theP2 )
inlineconstexprnoexcept

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

◆ Translate() [2/2]

constexpr void gp_Pnt2d::Translate ( const gp_Vec2d & 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]

constexpr gp_Pnt2d gp_Pnt2d::Translated ( const gp_Pnt2d & theP1,
const gp_Pnt2d & theP2 ) const
inlineconstexprnoexcept

◆ Translated() [2/2]

constexpr gp_Pnt2d gp_Pnt2d::Translated ( const gp_Vec2d & theV) const
inlineconstexprnoexcept

◆ X()

constexpr double gp_Pnt2d::X ( ) const
inlineconstexprnoexcept

For this point, returns its X coordinate.

◆ XY()

constexpr const gp_XY & gp_Pnt2d::XY ( ) const
inlineconstexprnoexcept

For this point, returns its two coordinates as a number pair.

◆ Y()

constexpr double gp_Pnt2d::Y ( ) const
inlineconstexprnoexcept

For this point, returns its Y coordinate.


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