1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROData_PolylineOperator_HeaderFile
20 #define HYDROData_PolylineOperator_HeaderFile
22 #include <HYDROData_PolylineXY.h>
23 #include <Geom2d_Curve.hxx>
24 #include <gp_Pnt2d.hxx>
27 class HYDROData_PolylineOperator
30 HYDRODATA_EXPORT bool Split( const Handle( HYDROData_PolylineXY )& thePolyline,
31 const gp_Pnt2d& thePoint ) const;
32 HYDRODATA_EXPORT bool Split( const Handle( HYDROData_PolylineXY )& thePolyline,
33 const Handle( HYDROData_PolylineXY )& theTool ) const;
34 HYDRODATA_EXPORT bool Split( const HYDROData_SequenceOfObjects& thePolylines );
35 HYDRODATA_EXPORT bool Merge( const HYDROData_SequenceOfObjects& thePolylines );
37 static HYDRODATA_EXPORT std::vector<Handle( Geom2d_Curve )> GetCurves( const Handle( HYDROData_PolylineXY )& thePolyline );
39 static HYDRODATA_EXPORT std::vector<gp_Pnt2d> Intersection( const Handle( Geom2d_Curve )& theCurve,
40 const Handle( Geom2d_Curve )& theTool );
42 static HYDRODATA_EXPORT std::vector<Handle( Geom2d_Curve )> Split( const Handle( Geom2d_Curve )& theCurve,
43 const std::vector<gp_Pnt2d>& thePoints );
45 static HYDRODATA_EXPORT bool CreatePolylines( const std::vector<Handle( Geom2d_Curve )>& theCurves );