Salome HOME
multistudy removal part 1
[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    * Sets reference boundary polyline object for calculation case.
223    */
224   void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( opencascade::handle<HYDROData_PolylineXY>& )];
225   %MethodCode
226     Handle(HYDROData_PolylineXY) aRef =
227       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
228     if ( !aRef.IsNull() )
229     {
230       Py_BEGIN_ALLOW_THREADS
231       if ( sipSelfWasArg ) {
232         sipCpp->HYDROData_CalculationCase::SetBoundaryPolyline( aRef );
233       } else {
234         sipCpp->SetBoundaryPolyline( aRef );
235       }
236       Py_END_ALLOW_THREADS
237     }
238   %End
239
240   /**
241    * Returns reference boundary polyline object of calculation case.
242    */
243   HYDROData_PolylineXY GetBoundaryPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
244   %MethodCode
245     Handle(HYDROData_PolylineXY) aRef;
246     
247     Py_BEGIN_ALLOW_THREADS
248     aRef = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetBoundaryPolyline() : 
249                            sipCpp->GetBoundaryPolyline();
250     Py_END_ALLOW_THREADS
251     
252     sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
253   %End
254
255   /**
256    * Remove reference boundary polyline object from calculation case.
257    */
258   void RemoveBoundaryPolyline();
259   
260   void SetLandCoverMap( HYDROData_LandCoverMap theLandCoverMap ) [void ( const opencascade::handle<HYDROData_LandCoverMap>& )];
261   %MethodCode
262     Handle(HYDROData_LandCoverMap) aRef =
263       Handle(HYDROData_LandCoverMap)::DownCast( createHandle( a0 ) );
264     if ( !aRef.IsNull() )
265     {
266       Py_BEGIN_ALLOW_THREADS
267       if ( sipSelfWasArg ) {
268         sipCpp->HYDROData_CalculationCase::SetLandCoverMap( aRef );
269       } else {
270         sipCpp->SetLandCoverMap( aRef );
271       }
272       Py_END_ALLOW_THREADS
273     }
274   %End
275
276   void SetStricklerTable( HYDROData_StricklerTable theStricklerTable ) [void ( const opencascade::handle<HYDROData_StricklerTable>& )];
277    %MethodCode
278     Handle(HYDROData_StricklerTable) aRef =
279       Handle(HYDROData_StricklerTable)::DownCast( createHandle( a0 ) );
280     if ( !aRef.IsNull() )
281     {
282       Py_BEGIN_ALLOW_THREADS
283       if ( sipSelfWasArg ) {
284         sipCpp->HYDROData_CalculationCase::SetStricklerTable( aRef );
285       } else {
286         sipCpp->SetStricklerTable( aRef );
287       }
288       Py_END_ALLOW_THREADS
289     }
290   %End
291
292   /**
293    * Add new one child region for calculation case.
294    * The new region is added into the list of reference regions.
295    * The label of theZone is changed during this operation
296    * because of new region becomes the new parent for this zone.
297    */
298   HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [opencascade::handle<HYDROData_Region> ( opencascade::handle<HYDROData_Zone>& )];
299   %MethodCode
300     Handle(HYDROData_Zone) aRef =
301       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
302     Handle(HYDROData_Region) aRes;
303     
304     if ( !aRef.IsNull() )
305     {
306       Py_BEGIN_ALLOW_THREADS
307       aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddNewRegion( aRef ) : 
308                              sipCpp->AddNewRegion( aRef );
309       Py_END_ALLOW_THREADS
310     }
311     
312     sipRes = (HYDROData_Region*)createPointer( aRes );
313   %End
314
315   /**
316    * Add new one reference region for calculation case.
317    * The label of theRegion is changed in case if old parent is not this calculation.
318    */
319   bool AddRegion( HYDROData_Region theRegion ) [bool ( opencascade::handle<HYDROData_Region>& )];
320   %MethodCode
321     Handle(HYDROData_Region) aRef =
322       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
323     if ( !aRef.IsNull() )
324     {
325       Py_BEGIN_ALLOW_THREADS
326       sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRegion( aRef ):
327                                sipCpp->AddRegion( aRef );
328       Py_END_ALLOW_THREADS
329     }
330   %End
331
332   /**
333    * Returns all reference regions of calculation case.
334    */
335   HYDROData_SequenceOfObjects GetRegions() const;
336
337   /**
338    * Updates names of regions to correct order.
339    */
340   void UpdateRegionsOrder();
341
342   /**
343    * Removes reference region from calculation case.
344    */
345   void RemoveRegion( HYDROData_Region theRegion ) [void ( opencascade::handle<HYDROData_Region>& )];
346   %MethodCode
347     Handle(HYDROData_Region) aRef =
348       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
349     if ( !aRef.IsNull() )
350     {
351       Py_BEGIN_ALLOW_THREADS
352       if ( sipSelfWasArg ) {
353         sipCpp->HYDROData_CalculationCase::RemoveRegion( aRef );
354       } else {
355         sipCpp->RemoveRegion( aRef );
356       }
357       Py_END_ALLOW_THREADS
358     }
359   %End
360
361   /**
362    * Removes all reference regions from calculation case.
363    */
364   void RemoveRegions();
365
366   
367   /**
368    * Returns all reference geometry groups of calculation case.
369    */
370   HYDROData_SequenceOfObjects GetSplitGroups() const;
371
372   /**
373    * Removes all reference geometry groups from calculation case.
374    */
375   void RemoveSplitGroups();
376
377
378   /**
379    * Exports the calculation case data (shell and groups) to GEOM module.
380    * \param theGeomEngine GEOM module engine
381    * \return true in case of success
382    */
383 //TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine );
384         
385         QString Export( ) const;
386
387 public:      
388   // Public methods to work with Calculation services
389
390   /**
391    * Returns strickler coefficient for given point.
392    * \param thePoint the point to examine
393    * \return result strickler coefficient
394    */
395   double GetStricklerCoefficientForPoint( const double theCoordX,
396                                           const double theCoordY ) const [double ( const gp_XY& ) ];
397   %MethodCode
398     gp_XY aPnt( a0, a1 );
399   
400     Py_BEGIN_ALLOW_THREADS
401     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoint( aPnt ) : 
402                              sipCpp->GetStricklerCoefficientForPoint( aPnt );
403     Py_END_ALLOW_THREADS
404   %End
405
406   /**
407    * Returns altitude for given point.
408    * \param thePoint the point to examine
409    * \return result altitude value
410    */
411   double GetAltitudeForPoint( const double theCoordX,
412                               const double theCoordY ) const [double ( const gp_XY& )];
413   %MethodCode
414     gp_XY aPnt( a0, a1 );
415   
416     Py_BEGIN_ALLOW_THREADS
417     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt ) : 
418                              sipCpp->GetAltitudeForPoint( aPnt );
419     Py_END_ALLOW_THREADS
420   %End
421
422   /**
423    * Returns altitude for given point on given region.
424    * \param thePoint the point to examine
425    * \param theRegion reference region to check
426    * \return result altitude value
427    */
428   double GetAltitudeForPoint( const double     theCoordX,
429                               const double     theCoordY,
430                               HYDROData_Region theRegion ) const
431   [double ( const gp_XY&, opencascade::handle<HYDROData_Region>& )];
432   %MethodCode
433     gp_XY aPnt( a0, a1 );
434     Handle(HYDROData_Region) aRefRegion =
435       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
436
437     Py_BEGIN_ALLOW_THREADS
438     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefRegion ) : 
439                              sipCpp->GetAltitudeForPoint( aPnt, aRefRegion );
440     Py_END_ALLOW_THREADS
441   %End
442
443   /**
444    * Returns altitude for given point on given zone.
445    * \param thePoint the point to examine
446    * \param theZone reference zone to check
447    * \return result altitude value
448    */
449   double GetAltitudeForPoint( const double theCoordX,
450                               const double theCoordY,
451                               HYDROData_Zone theZone ) const
452   [double ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
453   %MethodCode
454     gp_XY aPnt( a0, a1 );
455     Handle(HYDROData_Zone) aRefZone =
456       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
457
458     Py_BEGIN_ALLOW_THREADS
459     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefZone ) : 
460                              sipCpp->GetAltitudeForPoint( aPnt, aRefZone );
461     Py_END_ALLOW_THREADS
462   %End
463
464   /**
465    * Returns altitudes for given points on given region.
466    * \param thePoints the points to examine
467    * \param theZone reference region to check
468    * \return result altitude value
469    */
470   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
471                                                       const NCollection_Sequence<double>& theCoordsY,
472                                                       HYDROData_Region                    theRegion,
473                                                       int                                 theMethod = 0) const
474   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Region>&, int)];
475   %MethodCode
476
477     NCollection_Sequence<gp_XY> aPnts;
478
479     int aLen = qMin( a0->Length(), a1->Length() );
480     for ( int i = 1; i <= aLen; ++i )
481     {
482       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
483       aPnts.Append( aPnt );
484     }
485
486     Handle(HYDROData_Region) aRefRegion =
487       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
488     int aMethod = a3;
489     
490     NCollection_Sequence<double> aRes;
491     Py_BEGIN_ALLOW_THREADS
492     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefRegion, aMethod ) : 
493                            sipCpp->GetAltitudesForPoints( aPnts, aRefRegion, aMethod );
494     Py_END_ALLOW_THREADS
495     
496     sipRes = new NCollection_Sequence<double>( aRes );
497   %End
498
499   std::vector<double> GetStricklerCoefficientForPoints( const NCollection_Sequence<double>& theCoordsX,
500                                                         const NCollection_Sequence<double>& theCoordsY,
501                                                         double DefValue,
502                                                         bool UseMax ) const
503   [std::vector<double> ( const NCollection_Sequence<gp_XY>&, double, bool)];
504   %MethodCode
505   std::vector<gp_XY> aPnts;
506   int aLen = qMin( a0->Length(), a1->Length() );
507   for ( int i = 1; i <= aLen; ++i )
508   {
509     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
510     aPnts.push_back( aPnt );
511   }
512   std::vector<double> aRes;
513   Py_BEGIN_ALLOW_THREADS
514   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoints( aPnts, a2, a3 ) : 
515                          sipCpp->GetStricklerCoefficientForPoints( aPnts, a2, a3 );
516   Py_END_ALLOW_THREADS
517   sipRes = new std::vector<double>( aRes );
518   %End
519
520
521   std::vector<int> GetStricklerTypeForPoints( const NCollection_Sequence<double>& theCoordsX,
522                                               const NCollection_Sequence<double>& theCoordsY ) const
523   [std::vector<int>( const NCollection_Sequence<gp_XY>& )];
524   %MethodCode
525   std::vector<gp_XY> aPnts;
526   int aLen = qMin( a0->Length(), a1->Length() );
527   for ( int i = 1; i <= aLen; ++i )
528   {
529     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
530     aPnts.push_back( aPnt );
531   }
532   std::vector<int> aRes;
533   Py_BEGIN_ALLOW_THREADS
534   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerTypeForPoints( aPnts ) : 
535                          sipCpp->GetStricklerTypeForPoints( aPnts );
536   Py_END_ALLOW_THREADS
537   sipRes = new std::vector<int>( aRes );
538   %End
539
540
541   /**
542    * Returns altitudes for given points on given zone.
543    * \param thePoints the points to examine
544    * \param theZone reference zone to check
545    * \return result altitude value
546    */
547   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
548                                                       const NCollection_Sequence<double>& theCoordsY,
549                                                       HYDROData_Zone                      theZone,
550                                                       int                                 theMethod = 0) const
551   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Zone>&, int )];
552   %MethodCode
553
554     NCollection_Sequence<gp_XY> aPnts;
555
556     int aLen = qMin( a0->Length(), a1->Length() );
557     for ( int i = 1; i <= aLen; ++i )
558     {
559       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
560       aPnts.Append( aPnt );
561     }
562
563     Handle(HYDROData_Zone) aRefZone =
564       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
565     int aMethod = a3;
566
567     NCollection_Sequence<double> aRes;
568     Py_BEGIN_ALLOW_THREADS
569     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefZone, aMethod ) : 
570                            sipCpp->GetAltitudesForPoints( aPnts, aRefZone, aMethod );
571     Py_END_ALLOW_THREADS
572     
573     sipRes = new NCollection_Sequence<double>( aRes );
574   %End
575   
576   /**
577    * Returns region to which the point is belongs.
578    * \param thePoint the point to examine
579    * \return result region
580    */
581   HYDROData_Region GetRegionFromPoint( const double theCoordX,
582                                        const double theCoordY ) const
583   [opencascade::handle<HYDROData_Region> ( const gp_XY& )];
584   %MethodCode
585     Handle(HYDROData_Region) aRes;
586     
587     gp_XY aPnt( a0, a1 );
588   
589     Py_BEGIN_ALLOW_THREADS
590     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetRegionFromPoint( aPnt ) : 
591                            sipCpp->GetRegionFromPoint( aPnt );
592     Py_END_ALLOW_THREADS
593     
594     sipRes = (HYDROData_Region*)createPointer( aRes );
595   %End
596
597   /**
598    * Returns zone to which the point is belongs.
599    * \param thePoint the point to examine
600    * \return result zone
601    */
602   HYDROData_Zone GetZoneFromPoint( const double theCoordX,
603                                    const double theCoordY ) const
604   [opencascade::handle<HYDROData_Zone> ( const gp_XY& )];
605   %MethodCode
606     Handle(HYDROData_Zone) aRes;
607     
608     gp_XY aPnt( a0, a1 );
609   
610     Py_BEGIN_ALLOW_THREADS
611     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetZoneFromPoint( aPnt ) : 
612                            sipCpp->GetZoneFromPoint( aPnt );
613     Py_END_ALLOW_THREADS
614     
615     sipRes = (HYDROData_Zone*)createPointer( aRes );
616   %End
617
618   /**
619    * Returns classification of point for given zone.
620    * \param thePoint the point to examine
621    * \param theZone the zone to examine
622    * \return result classification
623    */
624   PointClassification GetPointClassification( const double theCoordX,
625                                               const double theCoordY,
626                                               HYDROData_Zone theZone ) const 
627   [PointClassification ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];    
628   %MethodCode
629     gp_XY aPnt( a0, a1 );
630
631     Handle(HYDROData_Zone) aRef =
632       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
633
634     Py_BEGIN_ALLOW_THREADS
635     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetPointClassification( aPnt, aRef ) : 
636                              sipCpp->GetPointClassification( aPnt, aRef );
637     Py_END_ALLOW_THREADS
638   %End
639
640
641   void ClearRules( HYDROData_CalculationCase::DataTag theDataTag );
642
643   void AddRule( HYDROData_Entity                   theObject1,
644                 HYDROData_PriorityType             thePriority,
645                 HYDROData_Entity                   theObject2,
646                 HYDROData_Zone::MergeType          theMergeType,
647                                 HYDROData_CalculationCase::DataTag theDataTag )
648   [void ( const opencascade::handle<HYDROData_Entity>&, HYDROData_PriorityType, opencascade::handle<HYDROData_Entity>&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
649   %MethodCode
650     Handle(HYDROData_Entity) anObject1 = createHandle( a0 );
651     Handle(HYDROData_Entity) anObject2 = createHandle( a2 );
652
653     Py_BEGIN_ALLOW_THREADS
654     sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) : 
655                     sipCpp->AddRule( anObject1, a1, anObject2, a3, a4 );
656     Py_END_ALLOW_THREADS
657   %End
658
659   QString DumpRules();
660
661   void SetAssignmentMode( AssignmentMode theMode );
662   AssignmentMode GetAssignmentMode() const;
663
664 protected:
665
666   /**
667    * Creates new object in the internal data structure. Use higher level objects 
668    * to create objects with real content.
669    */
670   HYDROData_CalculationCase();
671
672   /**
673    * Destructs properties of the object and object itself, removes it from the document.
674    */
675   ~HYDROData_CalculationCase();
676 };
677
678