Salome HOME
some tests on bathy selection...
[modules/hydro.git] / src / HYDROPy / HYDROData_PolylineOperator.sip
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 %ExportedHeaderCode
20 #include <HYDROData_PolylineOperator.h>
21 %End
22
23 class HYDROData_PolylineOperator
24 {
25
26 %TypeHeaderCode
27 #include <HYDROData_PolylineOperator.h>
28 %End
29
30 public:
31
32   HYDROData_PolylineOperator();
33
34   ~HYDROData_PolylineOperator();
35
36   bool Split( HYDROData_Document theDoc,
37               HYDROData_PolylineXY thePolyline,
38               double x, double y,
39               double theTolerance ) const
40               [bool (opencascade::handle<HYDROData_Document>&, opencascade::handle<HYDROData_PolylineXY>&, const gp_Pnt2d&,  double)];
41   %MethodCode
42     Handle(HYDROData_PolylineXY) aPoly = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a1 ) );
43     gp_Pnt2d aPnt( a2, a3 );
44     if ( !aPoly.IsNull() )
45     {
46       Py_BEGIN_ALLOW_THREADS
47       sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Split( a0, aPoly, aPnt, a4 ):
48                                sipCpp->Split( a0, aPoly, aPnt, a4 );
49       Py_END_ALLOW_THREADS
50     }
51   %End
52
53   bool Split( HYDROData_Document theDoc,
54               HYDROData_PolylineXY thePolyline,
55                HYDROData_PolylineXY theTool,
56               double theTolerance,
57               bool& theIsIntersected) const
58               [bool (opencascade::handle<HYDROData_Document>&, opencascade::handle<HYDROData_PolylineXY>&, opencascade::handle<HYDROData_PolylineXY>&, double,  bool&)];
59   %MethodCode
60     Handle(HYDROData_PolylineXY) aPoly = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a1 ) );
61     Handle(HYDROData_PolylineXY) aTool = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a2 ) );
62     if ( !aPoly.IsNull()  && !aTool.IsNull())
63     {
64       Py_BEGIN_ALLOW_THREADS
65       sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Split( a0, aPoly, aTool, a3, a4 ):
66                                sipCpp->Split( a0, aPoly, aTool, a3, a4 );
67       Py_END_ALLOW_THREADS
68     }
69   %End
70
71   bool Split( HYDROData_Document theDoc,
72               const HYDROData_SequenceOfObjects& thePolylines,
73               double theTolerance )
74               [bool (opencascade::handle<HYDROData_Document>&, const HYDROData_SequenceOfObjects&, double)];
75   %MethodCode
76     Py_BEGIN_ALLOW_THREADS
77     sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Split( a0, *a1, a2):
78                             sipCpp->Split( a0, *a1, a2);
79     Py_END_ALLOW_THREADS
80   %End
81
82   bool Merge( HYDROData_Document theDoc,
83               const QString& theName,
84               const HYDROData_SequenceOfObjects& thePolylines,
85               bool isConnectByNewSegment,
86               double theTolerance )
87               [bool (opencascade::handle<HYDROData_Document>&, const QString&, const HYDROData_SequenceOfObjects&, bool, double)];
88   %MethodCode
89     Py_BEGIN_ALLOW_THREADS
90     sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Merge( a0, *a1, *a2, a3, a4):
91                             sipCpp->Merge( a0, *a1, *a2, a3, a4);
92     Py_END_ALLOW_THREADS
93   %End
94 };
95
96