SHAPER  9.12.0
GeomAPI_Ellipse2d Class Reference

Ellipse in 2D. More...

Inheritance diagram for GeomAPI_Ellipse2d:
Inheritance graph

Public Member Functions

GEOMAPI_EXPORT GeomAPI_Ellipse2d (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Dir2d > &theXAxis, const double theMajorRadius, const double theMinorRadius)
 Constructs ellipse by center, X-axis and given radii. More...
 
GEOMAPI_EXPORT GeomAPI_Ellipse2d (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theAxisPoint, const std::shared_ptr< GeomAPI_Pnt2d > &thePassingPoint)
 Constructs ellipse by center and two points lying on the ellipse: first of them defines an axis of the ellipse and another is just placed on the ellipse. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2dcenter () const
 Returns center of the ellipse. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2dfirstFocus () const
 Returns first focus of the ellipse. More...
 
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt2dsecondFocus () const
 Returns second focus of the ellipse. More...
 
GEOMAPI_EXPORT double minorRadius () const
 Returns minor radius of the ellipse. More...
 
GEOMAPI_EXPORT double majorRadius () const
 Returns major radius of the ellipse. More...
 
GEOMAPI_EXPORT const std::shared_ptr< GeomAPI_Pnt2dproject (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint) const
 Project point on ellipse. 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 an ellipse. More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Lin2d > &theLine, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnMe, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnLine)
 Calculate minimal distance between the ellipse and a line. More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Circ2d > &theCircle, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnMe, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnCircle)
 Calculate minimal distance between the ellipse and a circle. More...
 
GEOMAPI_EXPORT double distance (const std::shared_ptr< GeomAPI_Ellipse2d > &theEllipse, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnMe, std::shared_ptr< GeomAPI_Pnt2d > &thePointOnEllipse)
 Calculate minimal distance between two ellipses. 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

Ellipse in 2D.

Constructor & Destructor Documentation

◆ GeomAPI_Ellipse2d() [1/2]

GeomAPI_Ellipse2d::GeomAPI_Ellipse2d ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Dir2d > &  theXAxis,
const double  theMajorRadius,
const double  theMinorRadius 
)

Constructs ellipse by center, X-axis and given radii.

◆ GeomAPI_Ellipse2d() [2/2]

GeomAPI_Ellipse2d::GeomAPI_Ellipse2d ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theAxisPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePassingPoint 
)

Constructs ellipse by center and two points lying on the ellipse: first of them defines an axis of the ellipse and another is just placed on the ellipse.

Member Function Documentation

◆ center()

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

Returns center of the ellipse.

◆ firstFocus()

std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Ellipse2d::firstFocus ( ) const

Returns first focus of the ellipse.

◆ secondFocus()

std::shared_ptr< GeomAPI_Pnt2d > GeomAPI_Ellipse2d::secondFocus ( ) const

Returns second focus of the ellipse.

◆ minorRadius()

double GeomAPI_Ellipse2d::minorRadius ( ) const

Returns minor radius of the ellipse.

◆ majorRadius()

double GeomAPI_Ellipse2d::majorRadius ( ) const

Returns major radius of the ellipse.

◆ project()

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

Project point on ellipse.

◆ parameter()

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

Computes the parameter of a given point on an ellipse.

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.

◆ distance() [1/3]

double GeomAPI_Ellipse2d::distance ( const std::shared_ptr< GeomAPI_Lin2d > &  theLine,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnMe,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnLine 
)

Calculate minimal distance between the ellipse and a line.

Return corresponding points on the ellipse and on the line.

◆ distance() [2/3]

double GeomAPI_Ellipse2d::distance ( const std::shared_ptr< GeomAPI_Circ2d > &  theCircle,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnMe,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnCircle 
)

Calculate minimal distance between the ellipse and a circle.

Return corresponding points on the ellipse and on the circle.

◆ distance() [3/3]

double GeomAPI_Ellipse2d::distance ( const std::shared_ptr< GeomAPI_Ellipse2d > &  theEllipse,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnMe,
std::shared_ptr< GeomAPI_Pnt2d > &  thePointOnEllipse 
)

Calculate minimal distance between two ellipses.

Return corresponding points on the ellipses.

◆ 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.