![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Point-BezierCurve extrema computation using grid-based approach. More...
#include <ExtremaPC_BezierCurve.hxx>
Public Member Functions | |
| ExtremaPC_BezierCurve (const occ::handle< Geom_BezierCurve > &theCurve) | |
| Constructor with Bezier curve (uses full curve domain). Grid is built eagerly at construction time. | |
| ExtremaPC_BezierCurve (const occ::handle< Geom_BezierCurve > &theCurve, const ExtremaPC::Domain1D &theDomain) | |
| Constructor with Bezier curve and parameter domain. Grid is built eagerly at construction time for the specified domain. | |
| ExtremaPC_BezierCurve (const ExtremaPC_BezierCurve &)=delete | |
| Copy constructor is deleted. | |
| ExtremaPC_BezierCurve & | operator= (const ExtremaPC_BezierCurve &)=delete |
| Copy assignment operator is deleted. | |
| ExtremaPC_BezierCurve (ExtremaPC_BezierCurve &&)=default | |
| Move constructor. | |
| ExtremaPC_BezierCurve & | operator= (ExtremaPC_BezierCurve &&)=default |
| Move assignment operator. | |
| gp_Pnt | Value (double theU) const |
| Evaluates point on curve at parameter. | |
| bool | IsBounded () const |
| Returns true if domain is bounded (subset of curve domain). | |
| const ExtremaPC::Domain1D & | Domain () const |
| Returns the domain. | |
| const ExtremaPC::Result & | Perform (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const |
| Compute extrema between point P and the curve. Uses domain specified at construction time. | |
| const ExtremaPC::Result & | PerformWithEndpoints (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const |
| Compute extrema between point P and the curve including endpoints. Uses domain specified at construction time. | |
| const occ::handle< Geom_BezierCurve > & | Curve () const |
| Returns the Bezier curve. | |
Point-BezierCurve extrema computation using grid-based approach.
Computes the extrema between a 3D point and a Bezier curve using a grid-based approach with Newton refinement.
The grid is cached for efficiency when performing multiple queries with the same parameter domain.
The algorithm:
This approach is simpler and more stable than BVH-based methods, with comparable accuracy for typical Bezier curves.
The domain is fixed at construction time and the grid is built eagerly for optimal performance with multiple queries.
|
explicit |
Constructor with Bezier curve (uses full curve domain). Grid is built eagerly at construction time.
| [in] | theCurve | Bezier curve handle |
| ExtremaPC_BezierCurve::ExtremaPC_BezierCurve | ( | const occ::handle< Geom_BezierCurve > & | theCurve, |
| const ExtremaPC::Domain1D & | theDomain ) |
Constructor with Bezier curve and parameter domain. Grid is built eagerly at construction time for the specified domain.
| [in] | theCurve | Bezier curve handle |
| [in] | theDomain | parameter domain (fixed for all queries) |
|
delete |
Copy constructor is deleted.
|
default |
Move constructor.
|
inline |
Returns the Bezier curve.
|
inline |
Returns the domain.
|
inline |
Returns true if domain is bounded (subset of curve domain).
|
delete |
Copy assignment operator is deleted.
|
default |
Move assignment operator.
| const ExtremaPC::Result & ExtremaPC_BezierCurve::Perform | ( | const gp_Pnt & | theP, |
| double | theTol, | ||
| ExtremaPC::SearchMode | theMode = ExtremaPC::SearchMode::MinMax ) const |
Compute extrema between point P and the curve. Uses domain specified at construction time.
| theP | query point |
| theTol | tolerance for root finding |
| theMode | search mode (MinMax, Min, or Max) |
| const ExtremaPC::Result & ExtremaPC_BezierCurve::PerformWithEndpoints | ( | const gp_Pnt & | theP, |
| double | theTol, | ||
| ExtremaPC::SearchMode | theMode = ExtremaPC::SearchMode::MinMax ) const |
Compute extrema between point P and the curve including endpoints. Uses domain specified at construction time.
| theP | query point |
| theTol | tolerance for root finding |
| theMode | search mode (MinMax, Min, or Max) |
Evaluates point on curve at parameter.
| theU | parameter |