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

Point-Hyperbola extrema computation. More...

#include <ExtremaPC_Hyperbola.hxx>

Public Member Functions

 ExtremaPC_Hyperbola (const gp_Hypr &theHyperbola)
 Constructor with hyperbola geometry (infinite).
 
 ExtremaPC_Hyperbola (const gp_Hypr &theHyperbola, const ExtremaPC::Domain1D &theDomain)
 Constructor with hyperbola geometry and parameter domain.
 
 ExtremaPC_Hyperbola (const ExtremaPC_Hyperbola &)=delete
 Copy constructor is deleted.
 
ExtremaPC_Hyperbolaoperator= (const ExtremaPC_Hyperbola &)=delete
 Copy assignment operator is deleted.
 
 ExtremaPC_Hyperbola (ExtremaPC_Hyperbola &&)=default
 Move constructor.
 
ExtremaPC_Hyperbolaoperator= (ExtremaPC_Hyperbola &&)=default
 Move assignment operator.
 
gp_Pnt Value (double theU) const
 Evaluates point on hyperbola at parameter using cached geometry.
 
bool IsBounded () const
 Returns true if domain is bounded.
 
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 hyperbola. 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 hyperbola arc including endpoints. Uses domain specified at construction time.
 
const gp_HyprHyperbola () const
 Returns the hyperbola geometry.
 

Detailed Description

Point-Hyperbola extrema computation.

Computes the extrema between a 3D point and a hyperbola. Uses quartic polynomial solving via MathPoly::Quartic with substitution.

The algorithm:

  1. Projects point P onto the hyperbola plane -> Pp
  2. For hyperbola C(u) = (R*cosh(u), r*sinh(u)) with major radius R and minor radius r, substitutes v = e^u to convert the transcendental equation to a polynomial: ((R^2 + r^2)/4) * v^4 - ((X*R + Y*r)/2) * v^3 + ((X*R - Y*r)/2) * v - ((R^2 + r^2)/4) = 0
  3. Filters positive roots (v > 0) and converts back via u = ln(v)
Note
A hyperbola can have up to 4 extrema.

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

Constructor & Destructor Documentation

◆ ExtremaPC_Hyperbola() [1/4]

ExtremaPC_Hyperbola::ExtremaPC_Hyperbola ( const gp_Hypr & theHyperbola)
inlineexplicit

Constructor with hyperbola geometry (infinite).

Parameters
[in]theHyperbolathe hyperbola to compute extrema for

◆ ExtremaPC_Hyperbola() [2/4]

ExtremaPC_Hyperbola::ExtremaPC_Hyperbola ( const gp_Hypr & theHyperbola,
const ExtremaPC::Domain1D & theDomain )
inline

Constructor with hyperbola geometry and parameter domain.

Parameters
[in]theHyperbolathe hyperbola to compute extrema for
[in]theDomainparameter domain (fixed for all queries)

◆ ExtremaPC_Hyperbola() [3/4]

ExtremaPC_Hyperbola::ExtremaPC_Hyperbola ( const ExtremaPC_Hyperbola & )
delete

Copy constructor is deleted.

◆ ExtremaPC_Hyperbola() [4/4]

ExtremaPC_Hyperbola::ExtremaPC_Hyperbola ( ExtremaPC_Hyperbola && )
default

Move constructor.

Member Function Documentation

◆ Domain()

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

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

◆ Hyperbola()

const gp_Hypr & ExtremaPC_Hyperbola::Hyperbola ( ) const
inline

Returns the hyperbola geometry.

◆ IsBounded()

bool ExtremaPC_Hyperbola::IsBounded ( ) const
inline

Returns true if domain is bounded.

◆ operator=() [1/2]

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

Copy assignment operator is deleted.

◆ operator=() [2/2]

ExtremaPC_Hyperbola & ExtremaPC_Hyperbola::operator= ( ExtremaPC_Hyperbola && )
default

Move assignment operator.

◆ Perform()

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

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

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

◆ PerformWithEndpoints()

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

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

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

◆ Value()

gp_Pnt ExtremaPC_Hyperbola::Value ( double theU) const
inline

Evaluates point on hyperbola at parameter using cached geometry.

Parameters
theUparameter
Returns
point on hyperbola

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