Open CASCADE Technology
7.1.0.beta

An algorithm to convert a sequence of adjacent nonrational Bezier curves into a BSpline curve. A CompBezierCurvesToBSplineCurve object provides a framework for: More...
#include <Convert_CompBezierCurvesToBSplineCurve.hxx>
Public Member Functions  
Convert_CompBezierCurvesToBSplineCurve (const Standard_Real AngularTolerance=1.0e4)  
Constructs a framework for converting a sequence of adjacent nonrational Bezier curves into a BSpline curve. Knots will be created on the computed BSpline curve at each junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. AngularTolerance (given in radians, and defaulted to 1.0 e4) will be used to check the parallelism of the two tangent vectors. Use the following functions: More...  
void  AddCurve (const TColgp_Array1OfPnt &Poles) 
Adds the Bezier curve defined by the table of poles Poles, to the sequence (still contained in this framework) of adjacent Bezier curves to be converted into a BSpline curve. Only polynomial (i.e. nonrational) Bezier curves are converted using this framework. If this is not the first call to the function (i.e. if this framework still contains data in its Bezier curve sequence), the degree of continuity of the BSpline curve will be increased at the time of computation at the first point of the added Bezier curve (i.e. the first point of the Poles table). This will be the case if the tangent vector of the curve at this point is parallel to the tangent vector at the end point of the preceding Bezier curve in the Bezier curve sequence still contained in this framework. An angular tolerance given at the time of construction of this framework will be used to check the parallelism of the two tangent vectors. This checking procedure and all related computations will be performed by the Perform function. When the adjacent Bezier curve sequence is complete, use the following functions: More...  
void  Perform () 
Computes all the data needed to build a BSpline curve equivalent to the adjacent Bezier curve sequence still contained in this framework. A knot is inserted on the computed BSpline curve at the junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. An angular tolerance given at the time of construction of this framework is used to check the parallelism of the two tangent vectors. Use the available consultation functions to access the computed data. This data may then be used to construct the BSpline curve. Warning Make sure that the curves in the Bezier curve sequence contained in this framework are adjacent. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above as this condition is not checked, either when defining the Bezier curve sequence or at the time of computation. More...  
Standard_Integer  Degree () const 
Returns the degree of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur. More...  
Standard_Integer  NbPoles () const 
Returns the number of poles of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur. More...  
void  Poles (TColgp_Array1OfPnt &Poles) const 
Loads the Poles table with the poles of the BSpline curve whose data is computed in this framework. Warning. More...  
Standard_Integer  NbKnots () const 
Returns the number of knots of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur. More...  
void  KnotsAndMults (TColStd_Array1OfReal &Knots, TColStd_Array1OfInteger &Mults) const 
An algorithm to convert a sequence of adjacent nonrational Bezier curves into a BSpline curve. A CompBezierCurvesToBSplineCurve object provides a framework for:
Convert_CompBezierCurvesToBSplineCurve::Convert_CompBezierCurvesToBSplineCurve  (  const Standard_Real  AngularTolerance = 1.0e4  ) 
Constructs a framework for converting a sequence of adjacent nonrational Bezier curves into a BSpline curve. Knots will be created on the computed BSpline curve at each junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. AngularTolerance (given in radians, and defaulted to 1.0 e4) will be used to check the parallelism of the two tangent vectors. Use the following functions:
void Convert_CompBezierCurvesToBSplineCurve::AddCurve  (  const TColgp_Array1OfPnt &  Poles  ) 
Adds the Bezier curve defined by the table of poles Poles, to the sequence (still contained in this framework) of adjacent Bezier curves to be converted into a BSpline curve. Only polynomial (i.e. nonrational) Bezier curves are converted using this framework. If this is not the first call to the function (i.e. if this framework still contains data in its Bezier curve sequence), the degree of continuity of the BSpline curve will be increased at the time of computation at the first point of the added Bezier curve (i.e. the first point of the Poles table). This will be the case if the tangent vector of the curve at this point is parallel to the tangent vector at the end point of the preceding Bezier curve in the Bezier curve sequence still contained in this framework. An angular tolerance given at the time of construction of this framework will be used to check the parallelism of the two tangent vectors. This checking procedure and all related computations will be performed by the Perform function. When the adjacent Bezier curve sequence is complete, use the following functions:
Standard_Integer Convert_CompBezierCurvesToBSplineCurve::Degree  (  )  const 
Returns the degree of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
void Convert_CompBezierCurvesToBSplineCurve::KnotsAndMults  (  TColStd_Array1OfReal &  Knots, 
TColStd_Array1OfInteger &  Mults  
)  const 
and loads the Mults table with the corresponding multiplicities of the BSpline curve whose data is computed in this framework. Warning
Standard_Integer Convert_CompBezierCurvesToBSplineCurve::NbKnots  (  )  const 
Returns the number of knots of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Standard_Integer Convert_CompBezierCurvesToBSplineCurve::NbPoles  (  )  const 
Returns the number of poles of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
void Convert_CompBezierCurvesToBSplineCurve::Perform  (  ) 
Computes all the data needed to build a BSpline curve equivalent to the adjacent Bezier curve sequence still contained in this framework. A knot is inserted on the computed BSpline curve at the junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. An angular tolerance given at the time of construction of this framework is used to check the parallelism of the two tangent vectors. Use the available consultation functions to access the computed data. This data may then be used to construct the BSpline curve. Warning Make sure that the curves in the Bezier curve sequence contained in this framework are adjacent. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above as this condition is not checked, either when defining the Bezier curve sequence or at the time of computation.
void Convert_CompBezierCurvesToBSplineCurve::Poles  (  TColgp_Array1OfPnt &  Poles  )  const 
Loads the Poles table with the poles of the BSpline curve whose data is computed in this framework. Warning.