2 #ifndef HYDROData_BSplineOperation_HeaderFile
3 #define HYDROData_BSplineOperation_HeaderFile
7 #include <Geom_BSplineCurve.hxx>
9 #include <NCollection_Sequence.hxx>
14 /**\class HYDROData_BSplineOperation
16 * \brief Allows to work with splines: create, convert to Qt ToolPath.
18 * Uses GEOM module for creation of BSplines, OCCT algorithms for
19 * manipulation and conversion.
22 class HYDRODATA_EXPORT HYDROData_BSplineOperation
26 //! Creates a spline by list of coordinates: pairs X and Y
27 //! \param thePoints coordinates of curve
28 //! \param theIsClosed flag indicating that the result spline should be closed
29 HYDROData_BSplineOperation( const NCollection_Sequence<gp_XYZ>& thePoints,
30 const bool theIsClosed );
32 //! Returns the BSpline curve passing through the points
33 //! \returns Null if Computation of BSpline was failed
34 Handle(Geom_BSplineCurve) Curve() const { return myCurve; }
36 //! Performs conversion from BSpline curve to QPainterPath made from Bezier curves
37 //! \returns computed PainterPath, not stored in this class, so calling of this method is not fast
38 QPainterPath ComputePath() const;
41 Handle(Geom_BSplineCurve) myCurve; ///< resulting BSpline, null if something is wrong