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
20 #include <HYDROData_PolylineOperator.h>
23 class HYDROData_PolylineOperator
27 #include <HYDROData_PolylineOperator.h>
32 HYDROData_PolylineOperator();
34 ~HYDROData_PolylineOperator();
36 bool Split( HYDROData_Document theDoc,
37 HYDROData_PolylineXY thePolyline,
39 double theTolerance ) const
40 [bool (opencascade::handle<HYDROData_Document>&, opencascade::handle<HYDROData_PolylineXY>&, const gp_Pnt2d&, double)];
42 Handle(HYDROData_PolylineXY) aPoly = Handle(HYDROData_PolylineXY)::DownCast( createHandle( a1 ) );
43 gp_Pnt2d aPnt( a2, a3 );
44 if ( !aPoly.IsNull() )
46 Py_BEGIN_ALLOW_THREADS
47 sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Split( a0, aPoly, aPnt, a4 ):
48 sipCpp->Split( a0, aPoly, aPnt, a4 );
53 bool Split( HYDROData_Document theDoc,
54 HYDROData_PolylineXY thePolyline,
55 HYDROData_PolylineXY theTool,
57 bool& theIsIntersected) const
58 [bool (opencascade::handle<HYDROData_Document>&, opencascade::handle<HYDROData_PolylineXY>&, opencascade::handle<HYDROData_PolylineXY>&, double, bool&)];
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())
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 );
71 bool Split( HYDROData_Document theDoc,
72 const HYDROData_SequenceOfObjects& thePolylines,
74 [bool (opencascade::handle<HYDROData_Document>&, const HYDROData_SequenceOfObjects&, double)];
76 Py_BEGIN_ALLOW_THREADS
77 sipRes = sipSelfWasArg ? sipCpp->HYDROData_PolylineOperator::Split( a0, *a1, a2):
78 sipCpp->Split( a0, *a1, a2);
82 bool Merge( HYDROData_Document theDoc,
83 const QString& theName,
84 const HYDROData_SequenceOfObjects& thePolylines,
85 bool isConnectByNewSegment,
87 [bool (opencascade::handle<HYDROData_Document>&, const QString&, const HYDROData_SequenceOfObjects&, bool, double)];
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);