Salome HOME
merge BR_v14_rc
[modules/hydro.git] / src / HYDROData / HYDROData_SinusX.cxx
index c24905b1bd55500d8d2dc41e522d1e349d52f1a5..879b12d5f8ba1c715a97a07c9a90973999c14d89 100644 (file)
@@ -304,7 +304,7 @@ bool HYDROData_SinusX::Parse(QFile& theFile)
 
 }
 
-bool HYDROData_SinusX::Export(const QString& theFilePath, NCollection_Sequence<Handle_HYDROData_Entity>& theEntities)
+bool HYDROData_SinusX::Export(const QString& theFilePath, const NCollection_Sequence<Handle_HYDROData_Entity>& theEntities)
 {
   if ( theFilePath.isEmpty() )
   { 
@@ -330,7 +330,7 @@ bool HYDROData_SinusX::Export(const QString& theFilePath, NCollection_Sequence<H
 
 }
 
-void HYDROData_SinusX::HydroToSX(QFile& theFile, NCollection_Sequence<Handle_HYDROData_Entity>& theEntities)
+void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_Sequence<Handle_HYDROData_Entity>& theEntities)
 {
   QTextStream aTextStream(&theFile);
   aTextStream << "C  Generated by HYDRO Module\n";
@@ -341,17 +341,17 @@ void HYDROData_SinusX::HydroToSX(QFile& theFile, NCollection_Sequence<Handle_HYD
     Handle_HYDROData_Entity anEnt = theEntities.Value(i);
     if (anEnt->IsKind( STANDARD_TYPE(HYDROData_Bathymetry) ))
     {
-       Handle(HYDROData_Bathymetry) aBathy = Handle(HYDROData_Bathymetry)::DownCast( anEnt );
-       HYDROData_Bathymetry::AltitudePoints anXYZPoints = aBathy->GetAltitudePoints();
-       //Write to stream
-       aTextStream << "B S\n";
-       aTextStream << "CN " << aBathy->GetName() << "\n";
-       aTextStream << "CP 0 0\n";
-       aTextStream << "CP 0\n";
-       for (int j = anXYZPoints.Lower(); j <= anXYZPoints.Upper(); j++)
-         aTextStream << " " << QString::number(anXYZPoints(j).X(), 'f', 3)  
-                     << " " << QString::number(anXYZPoints(j).Y(), 'f', 3)  
-                     << " " << QString::number(anXYZPoints(j).Z(), 'f', 3) << "\n"; 
+      Handle(HYDROData_Bathymetry) aBathy = Handle(HYDROData_Bathymetry)::DownCast( anEnt );
+      HYDROData_Bathymetry::AltitudePoints anXYZPoints = aBathy->GetAltitudePoints(true);
+      //Write to stream
+      aTextStream << "B S\n";
+      aTextStream << "CN " << aBathy->GetName() << "\n";
+      aTextStream << "CP 0 0\n";
+      aTextStream << "CP 0\n";
+      for (int j = anXYZPoints.Lower(); j <= anXYZPoints.Upper(); j++)
+        aTextStream << " " << QString::number(anXYZPoints(j).X(), 'f', 3)  
+                    << " " << QString::number(anXYZPoints(j).Y(), 'f', 3)  
+                    << " " << QString::number(anXYZPoints(j).Z(), 'f', 3) << "\n"; 
     }
     else if (anEnt->IsKind( STANDARD_TYPE(HYDROData_PolylineXY) ))
     {
@@ -363,7 +363,7 @@ void HYDROData_SinusX::HydroToSX(QFile& theFile, NCollection_Sequence<Handle_HYD
         bool IsSpline = false;
         if (aPolyXY->GetSectionType(j) == HYDROData_PolylineXY::SECTION_SPLINE)
           IsSpline = true;
-        HYDROData_PolylineXY::PointsList anXYPoints = aPolyXY->GetPoints(j);
+        HYDROData_PolylineXY::PointsList anXYPoints = aPolyXY->GetPoints(j, true);
         //Write to stream
         aTextStream << "B N\n";
         aTextStream << "CN " << aPolyXY->GetName() << "\n";