C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Parameters for the approximation polyline by a NURBS curve. More...
#include <mb_smooth_nurbs_fit_curve.h>
Public Member Functions | |
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... | |
Parameters for the approximation polyline by a NURBS curve.
Parameters for the approximation polyline by a NURBS curve.
|
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.
[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). |
|
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.
[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). |
|
inline |
Initialize by points.
Initialize by points. Knot vector will be empty and should be defined in the approximation algorithm. Points parameters will be calculated by chord length method. All point weights are unit. There are no constraints for points and derivatives. The curve will be unclosed.
[in] | aPt | - Points for approximation. |
[in] | order | - Curve order. |
[in] | smooth | - Smoothing coefficient. |
[in] | orderSmoothing | - Derivative order for smoothing. |
[in] | tolerance | - Approximation tolerance. |
|
inline |
Initialize by points with end constraints.
Initialize by points. Knot vector and smoothing coefficient should be defined in the approximation algorithm. There are no constraints for inner points and derivatives. The curve will be unclosed.
[in] | aPt | - Points for approximation. |
[in] | order | - Curve order. |
[in] | tolerance | - Approximation tolerance. |
[in] | bFixBeginEnd | - Whether curve should coincide with first and last point. |
[in] | bClosed | - Closure flag. |
[in] | pDerBeg | - Curve beginnig derivative constraint (optional). |
[in] | pDerEnd | - Curve end derivative constraint (optional). |
|
inline |
Initialize by points with points and derivatives constraints.
Initialize by points with points and derivatives constraints. Knot vector and smoothing coefficient should be defined in the approximation algorithm.
[in] | aPt | - Points for approximation. |
[in] | order | - Curve order. |
[in] | tolerance | - Approximation tolerance. |
[in] | bClosed | - Closure flag. |
[in] | constraints | - Array of constraints for points and derivatives. First - index of fixed point. Second - derivative vector constraint, if nullptr - derivative is unconstrained for this point. |
|
inline |
Get point's weights.
Get curve for result comparing.
|
inline |
Set derivative weight and derivative itself for point with specified index.
Set curve for result comparing.
|
inline |
Set smoothing coefficient.
Get math version.