Converts geometrical entities into B-Spline representation. More...
Public Types | |
typedef ModelAlgo_BSplineConverterParameters | ParametersType |
Defines a converter parameters type. | |
Public Member Functions | |
ModelAlgo_BSplineConverter () | |
Constructor. | |
ModelAlgo_BSplineConverter (const ParametersType &theParameters) | |
Constructor. | |
const ParametersType & | Parameters () const |
Returns parameters. | |
ParametersType & | Parameters () |
Returns parameters. | |
void | SetParameters (const ParametersType &theParameters) |
Sets parameters. | |
void | Perform (const ModelData_Model &theModel) const |
Applies conversion to entire model. | |
void | Perform (const ModelData_SceneGraphElement &theElement) const |
Applies conversion to a sub-tree. | |
ModelData_Shape | Perform (const ModelData_Shape &theShape) const |
Applies conversion to a shape. | |
const std::shared_ptr< internal::ModelAlgo_BSplineConverterImpl > & | Impl () const |
Returns an implementation object. | |
Protected Attributes | |
std::shared_ptr< internal::ModelAlgo_BSplineConverterImpl > | myImpl |
Internal implementation object. | |
Converts geometrical entities into B-Spline representation.
Converts geometrical entities (surfaces, 3D curves and 2D curves) into NURBS (Non-Uniform Rational B-Spline) representation.
Conversion can be applied to entire model (ModelData_Model), any sub-tree in the scene graph (i.e. sub-assembly or part) or any particular shape (ModelData_Shape). When applied to entire model or a sub-tree traverses parts' B-Rep representations.
Conversion can be parametrized and constrained with the help of ModelAlgo_BSplineConverterParameters. Conversion first aims to satisfy the tolerance requirement, then the maximum degree and number of spans (number of unique knots - 1 for non-periodic B-Splines, same as the number of unique knots for periodic ones). When the degree and number of spans constraints can't be satisfied at once, the one specified as priority constraint (see ModelAlgo_BSplineConverterParameters::PriorityConstraint()) is respected.
If any particular geometry (a surface or a curve) is already of NURBS representation then skips it unless it exceeds the maximum degree or span count requirements (see ModelAlgo_BSplineConverterParameters::MaxDegree() and ModelAlgo_BSplineConverterParameters::MaxNumOfSpans()).
Example (applying to entire model):
Example (applying to a particular shape):
cadex::ModelAlgo_BSplineConverter::ModelAlgo_BSplineConverter | ( | ) |
Constructor.
Creates a converter with default parameters.
cadex::ModelAlgo_BSplineConverter::ModelAlgo_BSplineConverter | ( | const ParametersType & | theParameters | ) |
Constructor.
Creates a converter with specified parameters.