Salome HOME
refs #1376: now in the popup menu Show/Hide arrows are available always
[modules/hydro.git] / src / HYDROPy / HYDROData_CalculationCase.sip
index cc6dbe86b7040b66162242703751e353348c13e0..52c09e4f954aa47742ceb3502fa2b00ab380fc3f 100644 (file)
@@ -215,7 +215,38 @@ public:
    * Remove reference boundary polyline object from calculation case.
    */
   void RemoveBoundaryPolyline();
+  
+  void SetLandCoverMap( HYDROData_LandCoverMap theLandCoverMap ) [void ( const opencascade::handle<HYDROData_LandCoverMap>& )];
+  %MethodCode
+    Handle(HYDROData_LandCoverMap) aRef =
+      Handle(HYDROData_LandCoverMap)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      if ( sipSelfWasArg ) {
+        sipCpp->HYDROData_CalculationCase::SetLandCoverMap( aRef );
+      } else {
+        sipCpp->SetLandCoverMap( aRef );
+      }
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
+  void SetStricklerTable( HYDROData_StricklerTable theStricklerTable ) [void ( const opencascade::handle<HYDROData_StricklerTable>& )];
+   %MethodCode
+    Handle(HYDROData_StricklerTable) aRef =
+      Handle(HYDROData_StricklerTable)::DownCast( createHandle( a0 ) );
+    if ( !aRef.IsNull() )
+    {
+      Py_BEGIN_ALLOW_THREADS
+      if ( sipSelfWasArg ) {
+        sipCpp->HYDROData_CalculationCase::SetStricklerTable( aRef );
+      } else {
+        sipCpp->SetStricklerTable( aRef );
+      }
+      Py_END_ALLOW_THREADS
+    }
+  %End
 
   /**
    * Add new one child region for calculation case.
@@ -426,6 +457,48 @@ public:
     sipRes = new NCollection_Sequence<double>( aRes );
   %End
 
+  std::vector<double> GetStricklerCoefficientForPoints( const NCollection_Sequence<double>& theCoordsX,
+                                                        const NCollection_Sequence<double>& theCoordsY,
+                                                        double DefValue,
+                                                        bool UseMax ) const
+  [std::vector<double> ( const NCollection_Sequence<gp_XY>&, double, bool)];
+  %MethodCode
+  std::vector<gp_XY> aPnts;
+  int aLen = qMin( a0->Length(), a1->Length() );
+  for ( int i = 1; i <= aLen; ++i )
+  {
+    gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
+    aPnts.push_back( aPnt );
+  }
+  std::vector<double> aRes;
+  Py_BEGIN_ALLOW_THREADS
+  aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerCoefficientForPoints( aPnts, a2, a3 ) : 
+                         sipCpp->GetStricklerCoefficientForPoints( aPnts, a2, a3 );
+  Py_END_ALLOW_THREADS
+  sipRes = new std::vector<double>( aRes );
+  %End
+
+
+  std::vector<int> GetStricklerTypeForPoints( const NCollection_Sequence<double>& theCoordsX,
+                                              const NCollection_Sequence<double>& theCoordsY ) const
+  [std::vector<int>( const NCollection_Sequence<gp_XY>& )];
+  %MethodCode
+  std::vector<gp_XY> aPnts;
+  int aLen = qMin( a0->Length(), a1->Length() );
+  for ( int i = 1; i <= aLen; ++i )
+  {
+    gp_XY aPnt( a0->Value( i ), a1->Value( i ) );
+    aPnts.push_back( aPnt );
+  }
+  std::vector<int> aRes;
+  Py_BEGIN_ALLOW_THREADS
+  aRes = sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::GetStricklerTypeForPoints( aPnts ) : 
+                         sipCpp->GetStricklerTypeForPoints( aPnts );
+  Py_END_ALLOW_THREADS
+  sipRes = new std::vector<int>( aRes );
+  %End
+
+
   /**
    * Returns altitudes for given points on given zone.
    * \param thePoints the points to examine