]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_PolylineOperator.h
Salome HOME
Merge branch 'BR_v14_rc' of ssh://git.salome-platform.org/modules/hydro into BR_v14_rc
[modules/hydro.git] / src / HYDROData / HYDROData_PolylineOperator.h
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.
6 //
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.
11 //
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
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROData_PolylineOperator_HeaderFile
20 #define HYDROData_PolylineOperator_HeaderFile
21
22 #include <HYDROData_PolylineXY.h>
23 #include <Geom2d_Curve.hxx>
24 #include <gp_Pnt2d.hxx>
25 #include <vector>
26
27 class HYDROData_PolylineOperator
28 {
29 public:
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 );
36
37   static HYDRODATA_EXPORT std::vector<Handle( Geom2d_Curve )> GetCurves( const Handle( HYDROData_PolylineXY )& thePolyline );
38
39   static HYDRODATA_EXPORT std::vector<gp_Pnt2d> Intersection( const Handle( Geom2d_Curve )& theCurve,
40                                                               const Handle( Geom2d_Curve )& theTool );
41
42   static HYDRODATA_EXPORT std::vector<Handle( Geom2d_Curve )> Split( const Handle( Geom2d_Curve )& theCurve,
43                                                                      const std::vector<gp_Pnt2d>& thePoints );
44
45   static HYDRODATA_EXPORT bool CreatePolylines( const std::vector<Handle( Geom2d_Curve )>& theCurves );
46 };
47
48 #endif