Salome HOME
a first solution to get altitude text on bathymetrie selection of points
[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    * \brief Set the Container Name to use when not default (FactoryServer).
379    * \param theContainerName the name of the container used for GEOM 
380    *        (to be used by scripts for distributed execution)
381    */
382   void SetContainerName( const QString& theContainerName );
383
384   /**
385    * Exports the calculation case data (shell and groups) to GEOM module.
386    * \param theGeomEngine GEOM module engine
387    * \return true in case of success
388    */
389 //TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine );
390         
391         QString Export( ) const;
392
393 public:      
394   // Public methods to work with Calculation services
395
396   /**
397    * Returns strickler coefficient for given point.
398    * \param thePoint the point to examine
399    * \return result strickler coefficient
400    */
401   double GetStricklerCoefficientForPoint( const double theCoordX,
402                                           const double theCoordY ) const [double ( const gp_XY& ) ];
403   %MethodCode
404     gp_XY aPnt( a0, a1 );
405   
406     Py_BEGIN_ALLOW_THREADS
407     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoint( aPnt ) : 
408                              sipCpp->GetStricklerCoefficientForPoint( aPnt );
409     Py_END_ALLOW_THREADS
410   %End
411
412   /**
413    * Returns altitude for given point.
414    * \param thePoint the point to examine
415    * \return result altitude value
416    */
417   double GetAltitudeForPoint( const double theCoordX,
418                               const double theCoordY ) const [double ( const gp_XY& )];
419   %MethodCode
420     gp_XY aPnt( a0, a1 );
421   
422     Py_BEGIN_ALLOW_THREADS
423     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt ) : 
424                              sipCpp->GetAltitudeForPoint( aPnt );
425     Py_END_ALLOW_THREADS
426   %End
427
428   /**
429    * Returns altitude for given point on given region.
430    * \param thePoint the point to examine
431    * \param theRegion reference region to check
432    * \return result altitude value
433    */
434   double GetAltitudeForPoint( const double     theCoordX,
435                               const double     theCoordY,
436                               HYDROData_Region theRegion ) const
437   [double ( const gp_XY&, opencascade::handle<HYDROData_Region>& )];
438   %MethodCode
439     gp_XY aPnt( a0, a1 );
440     Handle(HYDROData_Region) aRefRegion =
441       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
442
443     Py_BEGIN_ALLOW_THREADS
444     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefRegion ) : 
445                              sipCpp->GetAltitudeForPoint( aPnt, aRefRegion );
446     Py_END_ALLOW_THREADS
447   %End
448
449   /**
450    * Returns altitude for given point on given zone.
451    * \param thePoint the point to examine
452    * \param theZone reference zone to check
453    * \return result altitude value
454    */
455   double GetAltitudeForPoint( const double theCoordX,
456                               const double theCoordY,
457                               HYDROData_Zone theZone ) const
458   [double ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
459   %MethodCode
460     gp_XY aPnt( a0, a1 );
461     Handle(HYDROData_Zone) aRefZone =
462       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
463
464     Py_BEGIN_ALLOW_THREADS
465     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudeForPoint( aPnt, aRefZone ) : 
466                              sipCpp->GetAltitudeForPoint( aPnt, aRefZone );
467     Py_END_ALLOW_THREADS
468   %End
469
470   /**
471    * Returns altitudes for given points on given region.
472    * \param thePoints the points to examine
473    * \param theZone reference region to check
474    * \return result altitude value
475    */
476   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
477                                                       const NCollection_Sequence<double>& theCoordsY,
478                                                       HYDROData_Region                    theRegion,
479                                                       int                                 theMethod = 0) const
480   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Region>&, int)];
481   %MethodCode
482
483     NCollection_Sequence<gp_XY> aPnts;
484
485     int aLen = qMin( a0->Length(), a1->Length() );
486     for ( int i = 1; i <= aLen; ++i )
487     {
488       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
489       aPnts.Append( aPnt );
490     }
491
492     Handle(HYDROData_Region) aRefRegion =
493       Handle(HYDROData_Region)::DownCast( createHandle( a2 ) );
494     int aMethod = a3;
495     
496     NCollection_Sequence<double> aRes;
497     Py_BEGIN_ALLOW_THREADS
498     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefRegion, aMethod ) : 
499                            sipCpp->GetAltitudesForPoints( aPnts, aRefRegion, aMethod );
500     Py_END_ALLOW_THREADS
501     
502     sipRes = new NCollection_Sequence<double>( aRes );
503   %End
504
505   std::vector<double> GetStricklerCoefficientForPoints( const NCollection_Sequence<double>& theCoordsX,
506                                                         const NCollection_Sequence<double>& theCoordsY,
507                                                         double DefValue,
508                                                         bool UseMax ) const
509   [std::vector<double> ( const NCollection_Sequence<gp_XY>&, double, bool)];
510   %MethodCode
511   std::vector<gp_XY> aPnts;
512   int aLen = qMin( a0->Length(), a1->Length() );
513   for ( int i = 1; i <= aLen; ++i )
514   {
515     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
516     aPnts.push_back( aPnt );
517   }
518   std::vector<double> aRes;
519   Py_BEGIN_ALLOW_THREADS
520   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoints( aPnts, a2, a3 ) : 
521                          sipCpp->GetStricklerCoefficientForPoints( aPnts, a2, a3 );
522   Py_END_ALLOW_THREADS
523   sipRes = new std::vector<double>( aRes );
524   %End
525
526
527   std::vector<int> GetStricklerTypeForPoints( const NCollection_Sequence<double>& theCoordsX,
528                                               const NCollection_Sequence<double>& theCoordsY ) const
529   [std::vector<int>( const NCollection_Sequence<gp_XY>& )];
530   %MethodCode
531   std::vector<gp_XY> aPnts;
532   int aLen = qMin( a0->Length(), a1->Length() );
533   for ( int i = 1; i <= aLen; ++i )
534   {
535     gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
536     aPnts.push_back( aPnt );
537   }
538   std::vector<int> aRes;
539   Py_BEGIN_ALLOW_THREADS
540   aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerTypeForPoints( aPnts ) : 
541                          sipCpp->GetStricklerTypeForPoints( aPnts );
542   Py_END_ALLOW_THREADS
543   sipRes = new std::vector<int>( aRes );
544   %End
545
546
547   /**
548    * Returns altitudes for given points on given zone.
549    * \param thePoints the points to examine
550    * \param theZone reference zone to check
551    * \return result altitude value
552    */
553   NCollection_Sequence<double> GetAltitudesForPoints( const NCollection_Sequence<double>& theCoordsX,
554                                                       const NCollection_Sequence<double>& theCoordsY,
555                                                       HYDROData_Zone                      theZone,
556                                                       int                                 theMethod = 0) const
557   [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Zone>&, int )];
558   %MethodCode
559
560     NCollection_Sequence<gp_XY> aPnts;
561
562     int aLen = qMin( a0->Length(), a1->Length() );
563     for ( int i = 1; i <= aLen; ++i )
564     {
565       gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
566       aPnts.Append( aPnt );
567     }
568
569     Handle(HYDROData_Zone) aRefZone =
570       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
571     int aMethod = a3;
572
573     NCollection_Sequence<double> aRes;
574     Py_BEGIN_ALLOW_THREADS
575     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetAltitudesForPoints( aPnts, aRefZone, aMethod ) : 
576                            sipCpp->GetAltitudesForPoints( aPnts, aRefZone, aMethod );
577     Py_END_ALLOW_THREADS
578     
579     sipRes = new NCollection_Sequence<double>( aRes );
580   %End
581   
582   /**
583    * Returns region to which the point is belongs.
584    * \param thePoint the point to examine
585    * \return result region
586    */
587   HYDROData_Region GetRegionFromPoint( const double theCoordX,
588                                        const double theCoordY ) const
589   [opencascade::handle<HYDROData_Region> ( const gp_XY& )];
590   %MethodCode
591     Handle(HYDROData_Region) aRes;
592     
593     gp_XY aPnt( a0, a1 );
594   
595     Py_BEGIN_ALLOW_THREADS
596     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetRegionFromPoint( aPnt ) : 
597                            sipCpp->GetRegionFromPoint( aPnt );
598     Py_END_ALLOW_THREADS
599     
600     sipRes = (HYDROData_Region*)createPointer( aRes );
601   %End
602
603   /**
604    * Returns zone to which the point is belongs.
605    * \param thePoint the point to examine
606    * \return result zone
607    */
608   HYDROData_Zone GetZoneFromPoint( const double theCoordX,
609                                    const double theCoordY ) const
610   [opencascade::handle<HYDROData_Zone> ( const gp_XY& )];
611   %MethodCode
612     Handle(HYDROData_Zone) aRes;
613     
614     gp_XY aPnt( a0, a1 );
615   
616     Py_BEGIN_ALLOW_THREADS
617     aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetZoneFromPoint( aPnt ) : 
618                            sipCpp->GetZoneFromPoint( aPnt );
619     Py_END_ALLOW_THREADS
620     
621     sipRes = (HYDROData_Zone*)createPointer( aRes );
622   %End
623
624   /**
625    * Returns classification of point for given zone.
626    * \param thePoint the point to examine
627    * \param theZone the zone to examine
628    * \return result classification
629    */
630   PointClassification GetPointClassification( const double theCoordX,
631                                               const double theCoordY,
632                                               HYDROData_Zone theZone ) const 
633   [PointClassification ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];    
634   %MethodCode
635     gp_XY aPnt( a0, a1 );
636
637     Handle(HYDROData_Zone) aRef =
638       Handle(HYDROData_Zone)::DownCast( createHandle( a2 ) );
639
640     Py_BEGIN_ALLOW_THREADS
641     sipRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetPointClassification( aPnt, aRef ) : 
642                              sipCpp->GetPointClassification( aPnt, aRef );
643     Py_END_ALLOW_THREADS
644   %End
645
646
647   void ClearRules( HYDROData_CalculationCase::DataTag theDataTag );
648
649   void AddRule( HYDROData_Entity                   theObject1,
650                 HYDROData_PriorityType             thePriority,
651                 HYDROData_Entity                   theObject2,
652                 HYDROData_Zone::MergeType          theMergeType,
653                                 HYDROData_CalculationCase::DataTag theDataTag )
654   [void ( const opencascade::handle<HYDROData_Entity>&, HYDROData_PriorityType, opencascade::handle<HYDROData_Entity>&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
655   %MethodCode
656     Handle(HYDROData_Entity) anObject1 = createHandle( a0 );
657     Handle(HYDROData_Entity) anObject2 = createHandle( a2 );
658
659     Py_BEGIN_ALLOW_THREADS
660     sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) : 
661                     sipCpp->AddRule( anObject1, a1, anObject2, a3, a4 );
662     Py_END_ALLOW_THREADS
663   %End
664
665   QString DumpRules();
666
667   void SetAssignmentMode( AssignmentMode theMode );
668   AssignmentMode GetAssignmentMode() const;
669
670 protected:
671
672   /**
673    * Creates new object in the internal data structure. Use higher level objects 
674    * to create objects with real content.
675    */
676   HYDROData_CalculationCase();
677
678   /**
679    * Destructs properties of the object and object itself, removes it from the document.
680    */
681   ~HYDROData_CalculationCase();
682 };
683
684