1 #ifndef HYDROOperations_BSpline_HeaderFile
2 #define HYDROOperations_BSpline_HeaderFile
4 #include <HYDROOperations.h>
6 #include <QPainterPath>
7 #include <Geom_BSplineCurve.hxx>
9 /**\class HYDROOperations_BSpline
11 * \brief Allows to work with splines: create, convert to Qt ToolPath.
13 * Uses GEOM module for creation of BSplines, OCCT algorithms for
14 * manipulation and conversion.
17 class HYDROOperations_BSpline
21 //! Creates a spline by list of coordinates: pairs X and Y
22 //! \param thePoints coordinates in format X1, Y1, X2, Y2, etc. must be even number of elements
23 HYDROOPERATIONS_EXPORT HYDROOperations_BSpline(QList<double>& thePoints);
25 //! Returns the BSpline curve passing through the points
26 //! \returns Null if Computation of BSpline was failed
27 Handle(Geom_BSplineCurve) Curve() const {return myCurve;}
29 //! Performs conversion from BSpline curve to QPainterPath made from Bezier curves
30 //! \returns computed PainterPath, not stored in this class, so calling of this method is not fast
31 QPainterPath ComputePath() const;
33 Handle(Geom_BSplineCurve) myCurve; ///< resulting BSpline, null if something is wrong