]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
GetStricklerCoefficientForPoints() py wrapper BR_MULTI_BATHS
authorisn <isn@opencascade.com>
Tue, 13 Sep 2016 12:39:06 +0000 (15:39 +0300)
committerisn <isn@opencascade.com>
Tue, 13 Sep 2016 12:39:06 +0000 (15:39 +0300)
src/HYDROPy/HYDROData_CalculationCase.sip

index cbca3857558b5e3cdb4e85a8e01ff02c4dc45ab6..01b1ae04f7d8ef86a4e7cb3120f2f5bd5ea94729 100644 (file)
@@ -426,6 +426,28 @@ 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
+
+
   /**
    * Returns altitudes for given points on given zone.
    * \param thePoints the points to examine