SHAPER  9.12.0
GeomAPI_Circ2d Class Reference

Circle in 2D. More...

Inheritance diagram for GeomAPI_Circ2d:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Circ2d (const double theCenterX, const double theCenterY, const double theRadius)
 Creation of circle defined by center point and circle radius. More...
 
GEOMAPI_EXPORT GeomAPI_Circ2d (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theCirclePoint)
 Creation of circle defined by center point and circle radius. More...
 
GEOMAPI_EXPORT GeomAPI_Circ2d (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Dir2d > &theDir, double theRadius)
 Creation of circle defined by center point, direction and circle radius. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2dcenter () const
 Return center of the circle. More...
 
GEOMAPI_EXPORT double radius () const
 Return radius of the circle. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2dproject (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint) const
 Project point on line. More...
 
GEOMAPI_EXPORT const bool parameter (const std::shared_ptr< GeomAPI_Pnt2d > thePoint, const double theTolerance, double &theParameter) const
 Computes the parameter of a given point on a circle. More...
 
GEOMAPI_EXPORT void D0 (const double theU, std::shared_ptr< GeomAPI_Pnt2d > &thePoint)
 Returns in thePoint the point of parameter theU. More...
 
template<class T >
T * implPtr ()
 Returns the pointer to the impl. More...
 
template<class T >
const T * implPtr () const
 Returns the pointer to the impl. More...
 
template<class T >
const T & impl () const
 Returns the reference object of the impl. More...
 
template<class T >
void setImpl (T *theImpl)
 Updates the impl (deletes the old one) More...
 
GEOMAPI_EXPORT bool empty () const
 Returns true if the impl is empty. More...
 

Detailed Description

Circle in 2D.

Constructor & Destructor Documentation

◆ GeomAPI_Circ2d() [1/3]

GeomAPI_Circ2d::GeomAPI_Circ2d ( const double  theCenterX,
const double  theCenterY,
const double  theRadius 
)

Creation of circle defined by center point and circle radius.

◆ GeomAPI_Circ2d() [2/3]

GeomAPI_Circ2d::GeomAPI_Circ2d ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theCirclePoint 
)

Creation of circle defined by center point and circle radius.

◆ GeomAPI_Circ2d() [3/3]

GeomAPI_Circ2d::GeomAPI_Circ2d ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Dir2d > &  theDir,
double  theRadius 
)

Creation of circle defined by center point, direction and circle radius.

Member Function Documentation

◆ center()

const std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Circ2d::center ( ) const

Return center of the circle.

◆ radius()

double GeomAPI_Circ2d::radius ( ) const

Return radius of the circle.

◆ project()

const std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Circ2d::project ( const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint) const

Project point on line.

◆ parameter()

const bool GeomAPI_Circ2d::parameter ( const std::shared_ptr< GeomAPI_Pnt2d thePoint,
const double  theTolerance,
double &  theParameter 
) const

Computes the parameter of a given point on a circle.

The point must be located either on the circle itself or relatively to the latter at a distance less than the tolerance value. Return FALSE if the point is beyond the tolerance limit or if computation fails. Max Tolerance value is currently limited to 1.e-4

Parameters
[in]thePointpoint of origin.
[in]theTolerancetolerance of computation.
[out]theParameterresulting parameter.

◆ D0()

void GeomAPI_Circ2d::D0 ( const double  theU,
std::shared_ptr< GeomAPI_Pnt2d > &  thePoint 
)

Returns in thePoint the point of parameter theU.

P = C + R * Cos (U) * XDir + R * Sin (U) * YDir where C is the center of the circle, XDir the XDirection and YDir the YDirection of the circle's local coordinate system.

Parameters
[in]theUparameter.
[out]thePointresulting point.

◆ implPtr() [1/2]

template<class T >
T* GeomAPI_Interface::implPtr ( )
inlineinherited

Returns the pointer to the impl.

◆ implPtr() [2/2]

template<class T >
const T* GeomAPI_Interface::implPtr ( ) const
inlineinherited

Returns the pointer to the impl.

◆ impl()

template<class T >
const T& GeomAPI_Interface::impl ( ) const
inlineinherited

Returns the reference object of the impl.

◆ setImpl()

template<class T >
void GeomAPI_Interface::setImpl ( T *  theImpl)
inlineinherited

Updates the impl (deletes the old one)

◆ empty()

bool GeomAPI_Interface::empty ( ) const
inherited

Returns true if the impl is empty.