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

Point-Ellipse extrema computation. More...

#include <ExtremaPC_Ellipse.hxx>

Public Member Functions

 ExtremaPC_Ellipse (const gp_Elips &theEllipse)
 Constructor with ellipse geometry (full ellipse).
 
 ExtremaPC_Ellipse (const gp_Elips &theEllipse, const ExtremaPC::Domain1D &theDomain)
 Constructor with ellipse geometry and parameter domain.
 
 ExtremaPC_Ellipse (const ExtremaPC_Ellipse &)=delete
 Copy constructor is deleted.
 
ExtremaPC_Ellipseoperator= (const ExtremaPC_Ellipse &)=delete
 Copy assignment operator is deleted.
 
 ExtremaPC_Ellipse (ExtremaPC_Ellipse &&)=default
 Move constructor.
 
ExtremaPC_Ellipseoperator= (ExtremaPC_Ellipse &&)=default
 Move assignment operator.
 
gp_Pnt Value (double theU) const
 Evaluates point on ellipse at parameter.
 
bool IsBounded () const
 Returns true if domain is bounded (partial arc).
 
const ExtremaPC::Domain1DDomain () const
 Returns the domain (only valid if IsBounded() is true).
 
const ExtremaPC::ResultPerform (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const
 Compute extrema between point P and the ellipse. Uses domain specified at construction time.
 
const ExtremaPC::ResultPerformWithEndpoints (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const
 Compute extrema between point P and the ellipse arc including endpoints. Uses domain specified at construction time.
 
const gp_ElipsEllipse () const
 Returns the ellipse geometry.
 

Detailed Description

Point-Ellipse extrema computation.

Computes the extrema between a 3D point and an ellipse. Uses trigonometric equation solving via MathRoot::Trigonometric.

The algorithm:

  1. Projects point P onto the ellipse plane -> Pp
  2. Solves: (B^2 - A^2)*cos(u)*sin(u) - B*Y*cos(u) + A*X*sin(u) = 0 where A = major radius, B = minor radius, and (X,Y) are coordinates of Pp in the ellipse local coordinate system.
Note
Degenerate case: When P projects to the ellipse center and A = B (i.e., the ellipse is a circle), returns Status::InfiniteSolutions.
An ellipse can have up to 4 extrema.

The domain is fixed at construction time for optimal performance. For full ellipse, construct without domain or with nullopt.

Constructor & Destructor Documentation

◆ ExtremaPC_Ellipse() [1/4]

ExtremaPC_Ellipse::ExtremaPC_Ellipse ( const gp_Elips & theEllipse)
inlineexplicit

Constructor with ellipse geometry (full ellipse).

Parameters
[in]theEllipsethe ellipse to compute extrema for

◆ ExtremaPC_Ellipse() [2/4]

ExtremaPC_Ellipse::ExtremaPC_Ellipse ( const gp_Elips & theEllipse,
const ExtremaPC::Domain1D & theDomain )
inline

Constructor with ellipse geometry and parameter domain.

Parameters
[in]theEllipsethe ellipse to compute extrema for
[in]theDomainparameter domain in radians (fixed for all queries)

◆ ExtremaPC_Ellipse() [3/4]

ExtremaPC_Ellipse::ExtremaPC_Ellipse ( const ExtremaPC_Ellipse & )
delete

Copy constructor is deleted.

◆ ExtremaPC_Ellipse() [4/4]

ExtremaPC_Ellipse::ExtremaPC_Ellipse ( ExtremaPC_Ellipse && )
default

Move constructor.

Member Function Documentation

◆ Domain()

const ExtremaPC::Domain1D & ExtremaPC_Ellipse::Domain ( ) const
inline

Returns the domain (only valid if IsBounded() is true).

◆ Ellipse()

const gp_Elips & ExtremaPC_Ellipse::Ellipse ( ) const
inline

Returns the ellipse geometry.

◆ IsBounded()

bool ExtremaPC_Ellipse::IsBounded ( ) const
inline

Returns true if domain is bounded (partial arc).

◆ operator=() [1/2]

ExtremaPC_Ellipse & ExtremaPC_Ellipse::operator= ( const ExtremaPC_Ellipse & )
delete

Copy assignment operator is deleted.

◆ operator=() [2/2]

ExtremaPC_Ellipse & ExtremaPC_Ellipse::operator= ( ExtremaPC_Ellipse && )
default

Move assignment operator.

◆ Perform()

const ExtremaPC::Result & ExtremaPC_Ellipse::Perform ( const gp_Pnt & theP,
double theTol,
ExtremaPC::SearchMode theMode = ExtremaPC::SearchMode::MinMax ) const
inline

Compute extrema between point P and the ellipse. Uses domain specified at construction time.

Parameters
thePquery point
theToltolerance for degenerate case detection
theModesearch mode (MinMax, Min, or Max)
Returns
const reference to result containing extrema or InfiniteSolutions status

◆ PerformWithEndpoints()

const ExtremaPC::Result & ExtremaPC_Ellipse::PerformWithEndpoints ( const gp_Pnt & theP,
double theTol,
ExtremaPC::SearchMode theMode = ExtremaPC::SearchMode::MinMax ) const
inline

Compute extrema between point P and the ellipse arc including endpoints. Uses domain specified at construction time.

Parameters
thePquery point
theToltolerance for degenerate case detection
theModesearch mode (MinMax, Min, or Max)
Returns
const reference to result containing interior + endpoint extrema or InfiniteSolutions status

◆ Value()

gp_Pnt ExtremaPC_Ellipse::Value ( double theU) const
inline

Evaluates point on ellipse at parameter.

Parameters
theUparameter (radians)
Returns
point on ellipse

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