From: Paul RASCLE Date: Tue, 3 May 2016 11:51:18 +0000 (+0200) Subject: bug EDF #12861: import Shapefile after Local Coordinates System change X-Git-Tag: v1.6~113^2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12660a6afb46ef8e00782b4a829a7a1e907b451a;p=modules%2Fhydro.git bug EDF #12861: import Shapefile after Local Coordinates System change --- diff --git a/src/HYDROData/HYDROData_ShapeFile.cxx b/src/HYDROData/HYDROData_ShapeFile.cxx index 93a75c2a..bea35faf 100644 --- a/src/HYDROData/HYDROData_ShapeFile.cxx +++ b/src/HYDROData/HYDROData_ShapeFile.cxx @@ -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])); } }