]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
bug EDF #12861: import Shapefile after Local Coordinates System change
authorPaul RASCLE <paul.rascle@edf.fr>
Tue, 3 May 2016 11:51:18 +0000 (13:51 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Tue, 3 May 2016 11:51:18 +0000 (13:51 +0200)
src/HYDROData/HYDROData_ShapeFile.cxx

index 93a75c2a4c212add5c924eefde6668f961afcd02..bea35fafbc1fc1c49cdd07a0f06d7de05341314f 100644 (file)
@@ -567,9 +567,8 @@ void HYDROData_ShapeFile::ReadSHPPolyXY(Handle(HYDROData_Document) theDocument,
       EndIndex--;
     for ( int k = StartIndex; k < EndIndex ; k++ )
     {
-      HYDROData_PolylineXY::Point aSectPoint;
-      aSectPoint.SetX( anObj->padfX[k] );
-      aSectPoint.SetY( anObj->padfY[k] );
+      HYDROData_PolylineXY::Point aSectPoint = gp_XY(anObj->padfX[k], anObj->padfY[k]);
+      theDocument->Transform(aSectPoint, true);
       aPolylineXY->AddPoint( i, aSectPoint );
     }
 
@@ -620,11 +619,10 @@ void HYDROData_ShapeFile::ReadSHPPoly3D(Handle(HYDROData_Document) theDocument,
       EndIndex--;
     for ( int k = StartIndex ; k < EndIndex ; k++ )
     {
-      HYDROData_PolylineXY::Point aSectPoint;
-      aSectPoint.SetX( anObj->padfX[k] );
-      aSectPoint.SetY( anObj->padfY[k] );
+      HYDROData_PolylineXY::Point aSectPoint = gp_XY(anObj->padfX[k], anObj->padfY[k]);
+      theDocument->Transform(aSectPoint, true);
       aPolylineXY->AddPoint( i, aSectPoint );
-      aAPoints.Append(gp_XYZ (anObj->padfX[k], anObj->padfY[k], anObj->padfZ[k]));
+      aAPoints.Append(gp_XYZ (aSectPoint.X(), aSectPoint.Y(), anObj->padfZ[k]));
     }
   }