|
| MbApproxNurbsParameters (VERSION version=Math::DefaultMathVersion()) |
| Default constructor.
|
|
| MbApproxNurbsParameters (const MbApproxNurbsParameters &other) |
| The copy constructor.
|
|
| ~MbApproxNurbsParameters () |
| Destructor.
|
|
void | Init (const MbApproxNurbsParameters &other) |
| Initialize by another parameters.
|
|
void | InitUniform (const std::vector< Point > &aPt, size_t order, size_t nSpan, double smooth, MbeSmoothingMethod typeSmoothing, double tolerance, bool bClosed, double extendBeg=0., double extendEnd=0.) |
| Initialize by points. Create uniform knot vector. More...
|
|
void | InitUniformByPointsAndParams (const std::vector< Point > &aPt, const std::vector< double > &aPrm, size_t order, size_t nSpan, double smooth, MbeSmoothingMethod typeSmoothing, double tolerance, bool bClosed, double extendBeg=0., double extendEnd=0.) |
| Initialize by points and parameters. Create uniform knot vector. More...
|
|
void | InitPoints (const std::vector< Point > &aPt, size_t order, double smooth, MbeSmoothingMethod typeSmoothing, double tolerance) |
| Initialize by points. More...
|
|
void | InitSimpleConstraints (const std::vector< Point > &aPt, size_t order, double tolerance, c3d::BoolPair bFixBeginEnd, bool bClosed, Vector *pDerBeg=nullptr, Vector *pDerEnd=nullptr) |
| Initialize by points with end constraints. More...
|
|
void | InitConstraints (const std::vector< Point > &aPt, size_t order, double tolerance, bool bClosed, const std::vector< std::pair< size_t, const Vector * >> &constraints) |
| Initialize by points with points and derivatives constraints. More...
|
|
bool | IsClosed () const |
| Whether curve closed.
|
|
size_t | GetOrder () const |
| Get NURBS order.
|
|
MbeSmoothingMethod | GetMethodOrderSmoothing () const |
| Get smoothing method.
|
|
double | GetSmoothCoefficient () const |
| Get smoothing coefficient.
|
|
double | GetTolerance () const |
| Get approximation tolerance.
|
|
const c3d::DoubleVector & | GetKnots () const |
| Get knots.
|
|
const std::vector< Point > & | GetPoints () const |
| Get points.
|
|
const c3d::DoubleVector & | GetPointsParameters () const |
| Get point's parameters.
|
|
const std::vector< MbApproxWeightConstraint< Vector > > & | GetPointsWeights () const |
| Get point's weights. More...
|
|
bool | IsSmoothDefined () const |
| Whether smoothing coefficient defined.
|
|
void | SetPointWeight (size_t idx, double weight) |
| Set weight for point with specified index.
|
|
void | SetWeightDerivative (size_t idx, double weight, const Vector &der) |
| Set derivative weight and derivative itself for point with specified index. More...
|
|
void | SetSmoothCoefficient (double smooth) |
| Set smoothing coefficient. More...
|
|
template<class Point, class Vector, class Nurbs>
class MbApproxNurbsParameters< Point, Vector, Nurbs >
Parameters for the approximation polyline by a NURBS curve.
Parameters for the approximation polyline by a NURBS curve.
template<class Point , class Vector , class Nurbs >
void MbApproxNurbsParameters< Point, Vector, Nurbs >::InitUniform |
( |
const std::vector< Point > & |
aPt, |
|
|
size_t |
order, |
|
|
size_t |
nSpan, |
|
|
double |
smooth, |
|
|
MbeSmoothingMethod |
typeSmoothing, |
|
|
double |
tolerance, |
|
|
bool |
bClosed, |
|
|
double |
extendBeg = 0. , |
|
|
double |
extendEnd = 0. |
|
) |
| |
|
inline |
Initialize by points. Create uniform knot vector.
Initialize by points. Create uniform knot vector with user defined number of spans. Points parameters will be calculated by chord length method. First and last knots will be equal to first and last paramemters values or will be extended by specified value. All point weights are unit. There are no constraints for points and derivatives. The curve will be unclosed.
- Parameters
-
[in] | aPt | - Points for approximation. |
[in] | order | - Curve order. |
[in] | nSpan | - Number of spans. |
[in] | smooth | - Smoothing coefficient. |
[in] | orderSmoothing | - Derivative order for smoothing. |
[in] | tolerance | - Approximation tolerance. |
[in] | bClosed | - Closure flag. |
[in] | extendBeg | - Parametric length extention value for the curve beginning as percent w.r.t. difference between last and first point parameter (optional). |
[in] | extendEnd | - Parametric length extention value for the curve end as percent w.r.t. difference between last and first point parameter (optional). |
template<class Point , class Vector , class Nurbs >
void MbApproxNurbsParameters< Point, Vector, Nurbs >::InitUniformByPointsAndParams |
( |
const std::vector< Point > & |
aPt, |
|
|
const std::vector< double > & |
aPrm, |
|
|
size_t |
order, |
|
|
size_t |
nSpan, |
|
|
double |
smooth, |
|
|
MbeSmoothingMethod |
typeSmoothing, |
|
|
double |
tolerance, |
|
|
bool |
bClosed, |
|
|
double |
extendBeg = 0. , |
|
|
double |
extendEnd = 0. |
|
) |
| |
|
inline |
Initialize by points and parameters. Create uniform knot vector.
Initialize by points and parameters. Create uniform knot vector with user defined number of spans. First and last knots will be equal to first and last paramemters values or will be extended by specified value. All point weights are unit. There are no constraints for points and derivatives. The curve will be unclosed.
- Parameters
-
[in] | aPt | - Points for approximation. |
[in] | aPrm | - Point parameters. |
[in] | order | - Curve order. |
[in] | nSpan | - Number of spans. |
[in] | smooth | - Smoothing coefficient. |
[in] | orderSmoothing | - Derivative order for smoothing. |
[in] | tolerance | - Approximation tolerance. |
[in] | bClosed | - Closure flag. |
[in] | extendBeg | - Parametric length extention value for the curve beginning as percent w.r.t. difference between last and first point parameter (optional). |
[in] | extendEnd | - Parametric length extention value for the curve end as percent w.r.t. difference between last and first point parameter (optional). |