Salome HOME
Lot 2: change bathy associated to natural object propagated to all cases without...
[modules/hydro.git] / src / HYDROData / HYDROData_ProfileUZ.cxx
index bfe75e3b55092840f3f6701cdf2f9e74bb27cc5b..8ef3dfb6972011570c490e01489bba237c49a107 100644 (file)
@@ -36,7 +36,6 @@
 #include <HYDROData_PolylineXY.h>
 
 
-IMPLEMENT_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ProfileUZ, HYDROData_IPolyline)
 
 HYDROData_ProfileUZ::HYDROData_ProfileUZ()
@@ -279,14 +278,19 @@ HYDROData_ProfileUZ::PointsList HYDROData_ProfileUZ::GetPoints( const int /*theS
   return aResList;
 }
 
-void HYDROData_ProfileUZ::CalculateAndAddPoints(const NCollection_Sequence<gp_XYZ>& theXYZPoints, Handle_HYDROData_PolylineXY& thePolylineXY)
+void HYDROData_ProfileUZ::CalculateAndAddPoints(const NCollection_Sequence<gp_XYZ>& theXYZPoints, 
+  Handle(HYDROData_PolylineXY)& thePolylineXY,
+  bool fillPolyXY)
 {
    // Fill 2D polyline
-  for ( int i = 1; i <= theXYZPoints.Size(); i++ ) {
-    const HYDROData_Profile::ProfilePoint& aBottomPoint = theXYZPoints.Value( i );
-    thePolylineXY->AddPoint( 0, HYDROData_PolylineXY::Point( aBottomPoint.X(), aBottomPoint.Y() ) );
+  if (fillPolyXY)
+  {
+    for ( int i = 1; i <= theXYZPoints.Size(); i++ ) {
+      const HYDROData_Profile::ProfilePoint& aBottomPoint = theXYZPoints.Value( i );
+      thePolylineXY->AddPoint( 0, HYDROData_PolylineXY::Point( aBottomPoint.X(), aBottomPoint.Y() ) );
+    }
   }
-  
+
   // Calculate profile UZ points
 
   // First point