Salome HOME
Bug #490: batch mode error.
[modules/hydro.git] / src / HYDROData / HYDROData_StreamAltitude.cxx
index 11cd35e4d5e73359105f52d91e55c4d613bd7f98..8c1f9f69f53bf84c9ef70b73bb9db4dadcb102d5 100644 (file)
@@ -56,8 +56,8 @@ Standard_Real getAltitudeFromProfile( const Handle(HYDROData_Profile)& theProfil
   Standard_Real aResAlt = 0.0;
 
   gp_XY aFirstPoint, aLastPoint;
-  if ( !theProfile->GetLeftPoint( aFirstPoint ) ||
-       !theProfile->GetRightPoint( aLastPoint ) )
+  if ( !theProfile->GetLeftPoint( aFirstPoint, false ) ||
+       !theProfile->GetRightPoint( aLastPoint, false ) )
     return aResAlt;
 
   gp_Pnt aPnt1( aFirstPoint.X(), aFirstPoint.Y(), 0 );
@@ -73,7 +73,7 @@ Standard_Real getAltitudeFromProfile( const Handle(HYDROData_Profile)& theProfil
 
   gp_Pnt aPrevPoint;
   gp_Lin aPrevNormal;
-  HYDROData_Profile::ProfilePoints aProfilePoints = theProfile->GetProfilePoints();
+  HYDROData_Profile::ProfilePoints aProfilePoints = theProfile->GetProfilePoints( false );
   for ( int i = 1, n = aProfilePoints.Length(); i <= n; ++i )
   {
     gp_Pnt aProfPoint( aProfilePoints.Value( i ) );
@@ -143,7 +143,8 @@ bool HYDROData_StreamAltitude::getBoundaryProfilesForPoint(
       continue;
 
     gp_XY aFirstPoint, aLastPoint;
-    if ( !aProfile->GetLeftPoint( aFirstPoint ) || !aProfile->GetRightPoint( aLastPoint ) )
+    if ( !aProfile->GetLeftPoint( aFirstPoint, false ) ||
+         !aProfile->GetRightPoint( aLastPoint, false ) )
       continue;
 
     gp_Pnt aPnt1( aFirstPoint.X(), aFirstPoint.Y(), 0 );
@@ -258,7 +259,7 @@ double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) co
 
   // Interpolate altitudes
   // Left profile line ( the segment between the firts and the last profile point )
-  HYDROData_Profile::ProfilePoints aLeftProfilePoints = aLeftProfile->GetProfilePoints();
+  HYDROData_Profile::ProfilePoints aLeftProfilePoints = aLeftProfile->GetProfilePoints( false );
   gp_Pnt aLeftProfileP1( aLeftProfilePoints.First() );
   aLeftProfileP1.SetZ( 0 );
   gp_Pnt aLeftProfileP2( aLeftProfilePoints.Last() );
@@ -266,7 +267,7 @@ double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) co
   gp_Vec aLeftProfileVec( aLeftProfileP1, aLeftProfileP2 );
   Handle(Geom_Line) aLeftProfileLine = new Geom_Line( gp_Ax1( aLeftProfileP1, aLeftProfileVec ) );
   // Right profile line
-  HYDROData_Profile::ProfilePoints aRightProfilePoints = aRightProfile->GetProfilePoints();
+  HYDROData_Profile::ProfilePoints aRightProfilePoints = aRightProfile->GetProfilePoints( false );
   gp_Pnt aRightProfileP1( aRightProfilePoints.First() );
   aRightProfileP1.SetZ( 0 );
   gp_Pnt aRightProfileP2( aRightProfilePoints.Last() );