#include <CTiglBSplineApproxInterp.h>
Public Member Functions | |
| TIGL_EXPORT | CTiglBSplineApproxInterp (const TColgp_Array1OfPnt &points, int nControlPoints, int degree=3, bool continuous_if_closed=false) |
| TIGL_EXPORT CTiglApproxResult | FitCurve (const std::vector< double > &initialParms=std::vector< double >(), CalcPointVecErrorFct calcErrorFct=calcPointVecErrorMax) const |
| Returns the resulting curve and the fit error. | |
| TIGL_EXPORT CTiglApproxResult | FitCurveOptimal (const std::vector< double > &initialParms=std::vector< double >(), int maxIter=10, CalcPointVecErrorFct calcErrorFct=calcPointVecErrorMax) const |
| Fits the curve by optimizing the parameters. Important: Parameters of points that are interpolated are not optimized. | |
| TIGL_EXPORT void | InterpolatePoint (size_t pointIndex, bool withKink=false) |
| The specified point will be interpolated instead of approximated. | |
Private Member Functions | |
| void | computeKnots (int ncp, const std::vector< double > ¶ms, std::vector< double > &knots, std::vector< int > &mults) const |
| std::vector< double > | computeParameters (double alpha) const |
| bool | firstAndLastInterpolated () const |
| math_Matrix | getContinuityMatrix (int nCtrPnts, int contin_cons, const std::vector< double > ¶ms, const TColStd_Array1OfReal &flatKnots) const |
| bool | isClosed () const |
| double | maxDistanceOfBoundingBox (const TColgp_Array1OfPnt &points) const |
| computes the maximum distance of the given points | |
| void | optimizeParameters (const Handle(Geom_Curve)&curve, std::vector< double > &parms) const |
| ProjectResult | projectOnCurve (const gp_Pnt &pnt, const Handle(Geom_Curve)&curve, double initial_Parm) const |
| CTiglApproxResult | solve (const std::vector< double > ¶ms, const TColStd_Array1OfReal &knots, const TColStd_Array1OfInteger &mults, CalcPointVecErrorFct calcErrorFct=calcPointVecErrorMax) const |
Private Attributes | |
| bool | m_C2Continuous |
| determines the continuous closing of curve | |
| int | m_degree |
| degree of the B-spline | |
| std::vector< size_t > | m_indexOfApproximated |
| std::vector< size_t > | m_indexOfInterpolated |
| std::vector< size_t > | m_indexOfKinks |
| int | m_ncp |
| Number of control points of the B-spline. | |
| TColgp_Array1OfPnt | m_pnts |
| curve coordinates to be fitted by the B-spline | |
| TIGL_EXPORT tigl::CTiglBSplineApproxInterp::CTiglBSplineApproxInterp | ( | const TColgp_Array1OfPnt & | points, |
| int | nControlPoints, | ||
| int | degree = 3, | ||
| bool | continuous_if_closed = false ) |
|
private |
|
private |
|
private |
| TIGL_EXPORT CTiglApproxResult tigl::CTiglBSplineApproxInterp::FitCurve | ( | const std::vector< double > & | initialParms = std::vector< double >(), |
| CalcPointVecErrorFct | calcErrorFct = calcPointVecErrorMax ) const |
Returns the resulting curve and the fit error.
| TIGL_EXPORT CTiglApproxResult tigl::CTiglBSplineApproxInterp::FitCurveOptimal | ( | const std::vector< double > & | initialParms = std::vector< double >(), |
| int | maxIter = 10, | ||
| CalcPointVecErrorFct | calcErrorFct = calcPointVecErrorMax ) const |
Fits the curve by optimizing the parameters. Important: Parameters of points that are interpolated are not optimized.
|
private |
| TIGL_EXPORT void tigl::CTiglBSplineApproxInterp::InterpolatePoint | ( | size_t | pointIndex, |
| bool | withKink = false ) |
The specified point will be interpolated instead of approximated.
|
private |
|
private |
computes the maximum distance of the given points
|
private |
|
private |
|
private |
|
private |
determines the continuous closing of curve
|
private |
degree of the B-spline
|
private |
|
private |
|
private |
|
private |
Number of control points of the B-spline.
|
private |
curve coordinates to be fitted by the B-spline