Salome HOME
Update for occt 7.5.0
[modules/hydro.git] / src / HYDROPy / HYDROData_CalculationCase.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_CalculationCase.h>
21 #include <HYDROData_PriorityQueue.h>
22 %End
23
24 enum HYDROData_PriorityType
25 {
26   LESS,
27   GREATER,
28 };
29
30 class HYDROData_CalculationCase : public HYDROData_Entity
31 {
32
33 %TypeHeaderCode
34 #include <HYDROData_CalculationCase.h>
35 %End
36
37 %ConvertToSubClassCode
38     switch ( sipCpp->GetKind() )
39     {
40       case KIND_CALCULATION:
41         sipClass = sipClass_HYDROData_CalculationCase;
42         break;
43
44       default:
45         // We don't recognise the type.
46         sipClass = NULL;
47     }
48 %End
49
50 public:
51
52   enum PointClassification
53   {
54     POINT_OUT,  ///< point is out of zone face
55     POINT_IN,   ///< point is inside of zone face
56     POINT_ON    ///< point is on the edge of zone face
57   };
58
59   enum AssignmentMode
60   {
61     MANUAL = 0,
62     AUTOMATIC,
63   };
64
65 public:
66
67   enum DataTag
68   {
69     DataTag_First = 100,               ///< first tag, to reserve
70     DataTag_GeometryObject,            ///< reference geometry objects
71     DataTag_ChildRegion,               ///< child regions
72     DataTag_Region,                    ///< reference regions
73     DataTag_Polyline,                  ///< reference boundary polyline
74     DataTag_GeometryGroup,             ///< reference geometry groups
75     DataTag_SplitGroups,               ///< reference split groups
76     DataTag_CustomRules,               ///< custom rules
77     DataTag_AssignmentMode,            ///< assignment mode
78     DataTag_StricklerTable,            ///< reference Strickler table
79     DataTag_LandCover_Obsolete,                 ///< reference land covers
80     DataTag_CustomLandCoverRules_Obsolete,      ///< custom rules for land covers priority
81     DataTag_AssignmentLandCoverMode_Obsolete,   ///< assignment mode of land covers priority
82     DataTag_ChildLandCoverRegion_Obsolete,      ///< child land cover regions
83     DataTag_LandCoverRegion_Obsolete            ///< reference land cover regions
84   };
85
86 public:      
87   /**
88    * Add new one reference geometry object for calculation case.
89    */
90   bool AddGeometryObject( HYDROData_Object theObject ) [bool ( const opencascade::handle<HYDROData_Object>& )];
91   %MethodCode
92     Handle(HYDROData_Object) aRef =
93       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
94     if ( !aRef.IsNull() )
95     {
96       Py_BEGIN_ALLOW_THREADS
97       sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddGeometryObject( aRef ):
98                                sipCpp->AddGeometryObject( aRef );
99       Py_END_ALLOW_THREADS
100     }
101   %End
102
103   /**
104    * Returns all reference geometry objects of calculation case.
105    */
106   HYDROData_SequenceOfObjects GetGeometryObjects() const;
107
108   /**
109    * Removes reference geometry object from calculation case.
110    */
111   void RemoveGeometryObject( HYDROData_Object theObject )
112   [void ( const opencascade::handle<HYDROData_Object>& )];
113   %MethodCode
114     Handle(HYDROData_Object) aRef =
115       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
116     if ( !aRef.IsNull() )
117     {
118       Py_BEGIN_ALLOW_THREADS
119       if ( sipSelfWasArg ) {
120         sipCpp->HYDROData_CalculationCase::RemoveGeometryObject( aRef );
121       } else {
122         sipCpp->RemoveGeometryObject( aRef );
123       }
124       Py_END_ALLOW_THREADS
125     }
126   %End
127
128   /**
129    * Removes all reference geometry objects from calculation case.
130    */
131   void RemoveGeometryObjects();
132
133
134   /**
135    * Add new one reference geometry group for calculation case.
136    */
137   bool AddGeometryGroup( HYDROData_ShapesGroup theGroup ) [bool ( const opencascade::handle<HYDROData_ShapesGroup>& )];
138   %MethodCode
139     Handle(HYDROData_ShapesGroup) aRef =
140       Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
141     if ( !aRef.IsNull() )
142     {
143       Py_BEGIN_ALLOW_THREADS
144       sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddGeometryGroup( aRef ):
145                                sipCpp->AddGeometryGroup( aRef );
146       Py_END_ALLOW_THREADS
147     }
148   %End
149
150   /**
151    * Returns all reference geometry groups of calculation case.
152    */
153   HYDROData_SequenceOfObjects GetGeometryGroups() const;
154
155   /**
156    * Removes reference geometry group from calculation case.
157    */
158   void RemoveGeometryGroup( HYDROData_ShapesGroup theGroup ) [void ( opencascade::handle<HYDROData_ShapesGroup>& )];
159   %MethodCode
160     Handle(HYDROData_ShapesGroup) aRef =
161       Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
162     if ( !aRef.IsNull() )
163     {
164       Py_BEGIN_ALLOW_THREADS
165       if ( sipSelfWasArg ) {
166         sipCpp->HYDROData_CalculationCase::RemoveGeometryGroup( aRef );
167       } else {
168         sipCpp->RemoveGeometryGroup( aRef );
169       }
170       Py_END_ALLOW_THREADS
171     }
172   %End
173
174   /**
175    * Removes all reference geometry groups from calculation case.
176    */
177   void RemoveGeometryGroups();
178
179      
180   /**
181    * Add new boundary polygon to calculation case.
182    */
183   bool AddBoundaryPolygon( HYDROData_BCPolygon theObject ) [bool ( const opencascade::handle<HYDROData_BCPolygon>& )];
184   %MethodCode
185     Handle(HYDROData_BCPolygon) aRef =
186       Handle(HYDROData_BCPolygon)::DownCast( createHandle( a0 ) );
187     if ( !aRef.IsNull() )
188     {
189       Py_BEGIN_ALLOW_THREADS
190       sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddBoundaryPolygon( aRef ):
191                                sipCpp->AddBoundaryPolygon( aRef );
192       Py_END_ALLOW_THREADS
193     }
194   %End
195
196   /**
197    * Returns all boundary polygons of calculation case.
198    */
199   HYDROData_SequenceOfObjects GetBoundaryPolygons() const;
200
201   /**
202    * Removes boundary polygon from calculation case.
203    */
204   void RemoveBoundaryPolygon( HYDROData_BCPolygon theObject )
205   [void ( const opencascade::handle<HYDROData_BCPolygon>& )];
206   %MethodCode
207     Handle(HYDROData_BCPolygon) aRef =
208       Handle(HYDROData_BCPolygon)::DownCast( createHandle( a0 ) );
209     if ( !aRef.IsNull() )
210     {
211       Py_BEGIN_ALLOW_THREADS
212       if ( sipSelfWasArg ) {
213         sipCpp->HYDROData_CalculationCase::RemoveBoundaryPolygon( aRef );
214       } else {
215         sipCpp->RemoveBoundaryPolygon( aRef );
216       }
217       Py_END_ALLOW_THREADS
218     }
219   %End
220
221
222   /**
223    * Add a polyline (as a constraint for the mesh).
224    */
225   bool AddInterPoly( HYDROData_PolylineXY theInterPolyline ) [bool ( opencascade::handle<HYDROData_PolylineXY>& )];
226   %MethodCode
227     Handle(HYDROData_PolylineXY) aRef =
228       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
229     if ( !aRef.IsNull() )
230     {
231       Py_BEGIN_ALLOW_THREADS
232       if ( sipSelfWasArg ) {
233         sipRes = sipCpp->HYDROData_CalculationCase::AddInterPoly( aRef );
234       } else {
235         sipRes = sipCpp->AddInterPoly( aRef );
236       }
237       Py_END_ALLOW_THREADS
238     }
239   %End
240
241   /**
242    * Remove a polyline (as a constraint for the mesh).
243    */
244   void RemoveInterPolyObject( HYDROData_PolylineXY theInterPolyline ) [void ( opencascade::handle<HYDROData_PolylineXY>& )];
245   %MethodCode
246     Handle(HYDROData_PolylineXY) aRef =
247       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
248     if ( !aRef.IsNull() )
249     {
250       Py_BEGIN_ALLOW_THREADS
251       if ( sipSelfWasArg ) {
252         sipCpp->HYDROData_CalculationCase::RemoveInterPolyObject( aRef );
253       } else {
254         sipCpp->RemoveInterPolyObject( aRef );
255       }
256       Py_END_ALLOW_THREADS
257     }
258   %End
259
260   /**
261    * Sets reference boundary polyline object for calculation case.
262    */
263   void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( opencascade::handle<HYDROData_PolylineXY>& )];
264   %MethodCode
265     Handle(HYDROData_PolylineXY) aRef =
266       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
267     if ( !aRef.IsNull() )
268     {
269       Py_BEGIN_ALLOW_THREADS
270       if ( sipSelfWasArg ) {
271         sipCpp->HYDROData_CalculationCase::SetBoundaryPolyline( aRef );
272       } else {
273         sipCpp->SetBoundaryPolyline( aRef );
274       }
275       Py_END_ALLOW_THREADS
276     }
277   %End
278
279   /**
280    * Returns reference boundary polyline object of calculation case.
281    */
282   HYDROData_PolylineXY GetBoundaryPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
283   %MethodCode
284     Handle(HYDROData_PolylineXY) aRef;
285     
286     Py_BEGIN_ALLOW_THREADS
287     aRef = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetBoundaryPolyline() : 
288                            sipCpp->GetBoundaryPolyline();
289     Py_END_ALLOW_THREADS
290     
291     sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
292   %End
293
294   /**
295    * Remove reference boundary polyline object from calculation case.
296    */
297   void RemoveBoundaryPolyline();
298   
299   void SetLandCoverMap( HYDROData_LandCoverMap theLandCoverMap ) [void ( const opencascade::handle<HYDROData_LandCoverMap>& )];
300   %MethodCode
301     Handle(HYDROData_LandCoverMap) aRef =
302       Handle(HYDROData_LandCoverMap)::DownCast( createHandle( a0 ) );
303     if ( !aRef.IsNull() )
304     {
305       Py_BEGIN_ALLOW_THREADS
306       if ( sipSelfWasArg ) {
307         sipCpp->HYDROData_CalculationCase::SetLandCoverMap( aRef );
308       } else {
309         sipCpp->SetLandCoverMap( aRef );
310       }
311       Py_END_ALLOW_THREADS
312     }
313   %End
314
315   void SetStricklerTable( HYDROData_StricklerTable theStricklerTable ) [void ( const opencascade::handle<HYDROData_StricklerTable>& )];
316    %MethodCode
317     Handle(HYDROData_StricklerTable) aRef =
318       Handle(HYDROData_StricklerTable)::DownCast( createHandle( a0 ) );
319     if ( !aRef.IsNull() )
320     {
321       Py_BEGIN_ALLOW_THREADS
322       if ( sipSelfWasArg ) {
323         sipCpp->HYDROData_CalculationCase::SetStricklerTable( aRef );
324       } else {
325         sipCpp->SetStricklerTable( aRef );
326       }
327       Py_END_ALLOW_THREADS
328     }
329   %End
330
331   /**
332    * Add new one child region for calculation case.
333    * The new region is added into the list of reference regions.
334    * The label of theZone is changed during this operation
335    * because of new region becomes the new parent for this zone.
336    */
337   HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [opencascade::handle<HYDROData_Region> ( opencascade::handle<HYDROData_Zone>& )];
338   %MethodCode
339     Handle(HYDROData_Zone) aRef =
340       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
341     Handle(HYDROData_Region) aRes;
342     
343     if ( !aRef.IsNull() )
344     {
345       Py_BEGIN_ALLOW_THREADS
346       aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddNewRegion( aRef ) : 
347                              sipCpp->AddNewRegion( aRef );
348       Py_END_ALLOW_THREADS
349     }
350     
351     sipRes = (HYDROData_Region*)createPointer( aRes );
352   %End
353
354   /**
355    * Add new one reference region for calculation case.
356    * The label of theRegion is changed in case if old parent is not this calculation.
357    */
358   bool AddRegion( HYDROData_Region theRegion ) [bool ( opencascade::handle<HYDROData_Region>& )];
359   %MethodCode
360     Handle(HYDROData_Region) aRef =
361       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
362     if ( !aRef.IsNull() )
363     {
364       Py_BEGIN_ALLOW_THREADS
365       sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRegion( aRef ):
366                                sipCpp->AddRegion( aRef );
367       Py_END_ALLOW_THREADS
368     }
369   %End
370
371   /**
372    * Returns all reference regions of calculation case.
373    */
374   HYDROData_SequenceOfObjects GetRegions() const;
375
376   /**
377    * Updates names of regions to correct order.
378    */
379   void UpdateRegionsOrder();
380
381   /**
382    * Removes reference region from calculation case.
383    */
384   void RemoveRegion( HYDROData_Region theRegion ) [void ( opencascade::handle<HYDROData_Region>& )];
385   %MethodCode
386     Handle(HYDROData_Region) aRef =
387       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
388     if ( !aRef.IsNull() )
389     {
390       Py_BEGIN_ALLOW_THREADS
391       if ( sipSelfWasArg ) {
392         sipCpp->HYDROData_CalculationCase::RemoveRegion( aRef );
393       } else {
394         sipCpp->RemoveRegion( aRef );
395       }
396       Py_END_ALLOW_THREADS
397     }
398   %End
399
400   /**
401    * Removes all reference regions from calculation case.
402    */
403   void RemoveRegions();
404
405   
406   /**
407    * Returns all reference geometry groups of calculation case.
408    */
409   HYDROData_SequenceOfObjects GetSplitGroups() const;
410
411   /**
412    * Removes all reference geometry groups from calculation case.
413    */
414   void RemoveSplitGroups();
415
416   /**
417    * \brief Set the Container Name to use when not default (FactoryServer).
418    * \param theContainerName the name of the container used for GEOM 
419    *        (to be used by scripts for distributed execution)
420    */
421   void SetContainerName( const QString& theContainerName );
422
423   /**
424    * Exports the calculation case data (shell and groups) to GEOM module.
425    * \param theGeomEngine GEOM module engine
426    * \return true in case of success
427    */
428 //TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine );
429         
430         QString Export( ) const;
431
432 public:      
433   // Public methods to work with Calculation services
434
435   /**
436    * Returns strickler coefficient for given point.
437    * \param thePoint the point to examine
438    * \return result strickler coefficient
439    */
440   double GetStricklerCoefficientForPoint( const double theCoordX,
441                                           const double theCoordY ) const [double ( const gp_XY& ) ];
442   %MethodCode
443     gp_XY aPnt( a0, a1 );
444   
445     Py_BEGIN_ALLOW_THREADS
446     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoint( aPnt ) : 
447                              sipCpp->GetStricklerCoefficientForPoint( aPnt );
448     Py_END_ALLOW_THREADS
449   %End
450
451   /**
452    * Returns altitude for given point.
453    * \param thePoint the point to examine
454    * \return result altitude value
455    */
456   double GetAltitudeForPoint( const double theCoordX,
457                               const double theCoordY ) const [double ( const gp_XY& )];
458   %MethodCode
459     gp_XY aPnt( a0, a1 );
460   
461     Py_BEGIN_ALLOW_THREADS
462     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt ) : 
463                              sipCpp->GetAltitudeForPoint( aPnt );
464     Py_END_ALLOW_THREADS
465   %End
466
467   /**
468    * Returns altitude for given point on given region.
469    * \param thePoint the point to examine
470    * \param theRegion reference region to check
471    * \return result altitude value
472    */
473   double GetAltitudeForPoint( const double     theCoordX,
474                               const double     theCoordY,
475                               HYDROData_Region theRegion ) const
476   [double ( const gp_XY&, opencascade::handle<HYDROData_Region>& )];
477   %MethodCode
478     gp_XY aPnt( a0, a1 );
479     Handle(HYDROData_Region) aRefRegion =
480       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
481
482     Py_BEGIN_ALLOW_THREADS
483     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefRegion ) : 
484                              sipCpp->GetAltitudeForPoint( aPnt, aRefRegion );
485     Py_END_ALLOW_THREADS
486   %End
487
488   /**
489    * Returns altitude for given point on given zone.
490    * \param thePoint the point to examine
491    * \param theZone reference zone to check
492    * \return result altitude value
493    */
494   double GetAltitudeForPoint( const double theCoordX,
495                               const double theCoordY,
496                               HYDROData_Zone theZone ) const
497   [double ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
498   %MethodCode
499     gp_XY aPnt( a0, a1 );
500     Handle(HYDROData_Zone) aRefZone =
501       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
502
503     Py_BEGIN_ALLOW_THREADS
504     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefZone ) : 
505                              sipCpp->GetAltitudeForPoint( aPnt, aRefZone );
506     Py_END_ALLOW_THREADS
507   %End
508
509   /**
510    * Returns altitudes for given points on given region.
511    * \param thePoints the points to examine
512    * \param theZone reference region to check
513    * \return result altitude value
514    */
515   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
516                                                       const NCollection_Sequence<double>& theCoordsY,
517                                                       HYDROData_Region                    theRegion,
518                                                       int                                 theMethod = 0) const
519   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Region>&, int)];
520   %MethodCode
521
522     NCollection_Sequence<gp_XY> aPnts;
523
524     int aLen = qMin( a0->Length(), a1->Length() );
525     for ( int i = 1; i <= aLen; ++i )
526     {
527       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
528       aPnts.Append( aPnt );
529     }
530
531     Handle(HYDROData_Region) aRefRegion =
532       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
533     int aMethod = a3;
534     
535     NCollection_Sequence<double> aRes;
536     Py_BEGIN_ALLOW_THREADS
537     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefRegion, aMethod ) : 
538                            sipCpp->GetAltitudesForPoints( aPnts, aRefRegion, aMethod );
539     Py_END_ALLOW_THREADS
540     
541     sipRes = new NCollection_Sequence<double>( aRes );
542   %End
543
544   std::vector<double> GetStricklerCoefficientForPoints( const NCollection_Sequence<double>& theCoordsX,
545                                                         const NCollection_Sequence<double>& theCoordsY,
546                                                         double DefValue,
547                                                         bool UseMax ) const
548   [std::vector<double> ( const NCollection_Sequence<gp_XY>&, double, bool)];
549   %MethodCode
550   std::vector<gp_XY> aPnts;
551   int aLen = qMin( a0->Length(), a1->Length() );
552   for ( int i = 1; i <= aLen; ++i )
553   {
554     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
555     aPnts.push_back( aPnt );
556   }
557   std::vector<double> aRes;
558   Py_BEGIN_ALLOW_THREADS
559   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoints( aPnts, a2, a3 ) : 
560                          sipCpp->GetStricklerCoefficientForPoints( aPnts, a2, a3 );
561   Py_END_ALLOW_THREADS
562   sipRes = new std::vector<double>( aRes );
563   %End
564
565
566   std::vector<int> GetStricklerTypeForPoints( const NCollection_Sequence<double>& theCoordsX,
567                                               const NCollection_Sequence<double>& theCoordsY ) const
568   [std::vector<int>( const NCollection_Sequence<gp_XY>& )];
569   %MethodCode
570   std::vector<gp_XY> aPnts;
571   int aLen = qMin( a0->Length(), a1->Length() );
572   for ( int i = 1; i <= aLen; ++i )
573   {
574     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
575     aPnts.push_back( aPnt );
576   }
577   std::vector<int> aRes;
578   Py_BEGIN_ALLOW_THREADS
579   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerTypeForPoints( aPnts ) : 
580                          sipCpp->GetStricklerTypeForPoints( aPnts );
581   Py_END_ALLOW_THREADS
582   sipRes = new std::vector<int>( aRes );
583   %End
584
585
586   /**
587    * Returns altitudes for given points on given zone.
588    * \param thePoints the points to examine
589    * \param theZone reference zone to check
590    * \return result altitude value
591    */
592   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
593                                                       const NCollection_Sequence<double>& theCoordsY,
594                                                       HYDROData_Zone                      theZone,
595                                                       int                                 theMethod = 0) const
596   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Zone>&, int )];
597   %MethodCode
598
599     NCollection_Sequence<gp_XY> aPnts;
600
601     int aLen = qMin( a0->Length(), a1->Length() );
602     for ( int i = 1; i <= aLen; ++i )
603     {
604       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
605       aPnts.Append( aPnt );
606     }
607
608     Handle(HYDROData_Zone) aRefZone =
609       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
610     int aMethod = a3;
611
612     NCollection_Sequence<double> aRes;
613     Py_BEGIN_ALLOW_THREADS
614     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefZone, aMethod ) : 
615                            sipCpp->GetAltitudesForPoints( aPnts, aRefZone, aMethod );
616     Py_END_ALLOW_THREADS
617     
618     sipRes = new NCollection_Sequence<double>( aRes );
619   %End
620   
621   /**
622    * Returns region to which the point is belongs.
623    * \param thePoint the point to examine
624    * \return result region
625    */
626   HYDROData_Region GetRegionFromPoint( const double theCoordX,
627                                        const double theCoordY ) const
628   [opencascade::handle<HYDROData_Region> ( const gp_XY& )];
629   %MethodCode
630     Handle(HYDROData_Region) aRes;
631     
632     gp_XY aPnt( a0, a1 );
633   
634     Py_BEGIN_ALLOW_THREADS
635     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetRegionFromPoint( aPnt ) : 
636                            sipCpp->GetRegionFromPoint( aPnt );
637     Py_END_ALLOW_THREADS
638     
639     sipRes = (HYDROData_Region*)createPointer( aRes );
640   %End
641
642   /**
643    * Returns zone to which the point is belongs.
644    * \param thePoint the point to examine
645    * \return result zone
646    */
647   HYDROData_Zone GetZoneFromPoint( const double theCoordX,
648                                    const double theCoordY ) const
649   [opencascade::handle<HYDROData_Zone> ( const gp_XY& )];
650   %MethodCode
651     Handle(HYDROData_Zone) aRes;
652     
653     gp_XY aPnt( a0, a1 );
654   
655     Py_BEGIN_ALLOW_THREADS
656     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetZoneFromPoint( aPnt ) : 
657                            sipCpp->GetZoneFromPoint( aPnt );
658     Py_END_ALLOW_THREADS
659     
660     sipRes = (HYDROData_Zone*)createPointer( aRes );
661   %End
662
663   /**
664    * Returns classification of point for given zone.
665    * \param thePoint the point to examine
666    * \param theZone the zone to examine
667    * \return result classification
668    */
669   PointClassification GetPointClassification( const double theCoordX,
670                                               const double theCoordY,
671                                               HYDROData_Zone theZone ) const 
672   [PointClassification ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];    
673   %MethodCode
674     gp_XY aPnt( a0, a1 );
675
676     Handle(HYDROData_Zone) aRef =
677       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
678
679     Py_BEGIN_ALLOW_THREADS
680     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetPointClassification( aPnt, aRef ) : 
681                              sipCpp->GetPointClassification( aPnt, aRef );
682     Py_END_ALLOW_THREADS
683   %End
684
685
686   void ClearRules( HYDROData_CalculationCase::DataTag theDataTag );
687
688   void AddRule( HYDROData_Entity                   theObject1,
689                 HYDROData_PriorityType             thePriority,
690                 HYDROData_Entity                   theObject2,
691                 HYDROData_Zone::MergeType          theMergeType,
692                                 HYDROData_CalculationCase::DataTag theDataTag )
693   [void ( const opencascade::handle<HYDROData_Entity>&, HYDROData_PriorityType, opencascade::handle<HYDROData_Entity>&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
694   %MethodCode
695     Handle(HYDROData_Entity) anObject1 = createHandle( a0 );
696     Handle(HYDROData_Entity) anObject2 = createHandle( a2 );
697
698     Py_BEGIN_ALLOW_THREADS
699     sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) : 
700                     sipCpp->AddRule( anObject1, a1, anObject2, a3, a4 );
701     Py_END_ALLOW_THREADS
702   %End
703
704   QString DumpRules();
705
706   void SetAssignmentMode( AssignmentMode theMode );
707   AssignmentMode GetAssignmentMode() const;
708
709 protected:
710
711   /**
712    * Creates new object in the internal data structure. Use higher level objects 
713    * to create objects with real content.
714    */
715   HYDROData_CalculationCase();
716
717   /**
718    * Destructs properties of the object and object itself, removes it from the document.
719    */
720   ~HYDROData_CalculationCase();
721 };
722
723