X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_SinusX.cxx;h=3927c0a348a1d9e2c7b833d1ffc074d5268298b9;hb=cde2ec476486fcd7c9b7b38ce814c648d73e7fd3;hp=86a5b1518e092ef95e35b6753b4cd1037093f376;hpb=0bcb30ff9c650a39074d4208f09a59bef9127674;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_SinusX.cxx b/src/HYDROData/HYDROData_SinusX.cxx index 86a5b151..3927c0a3 100644 --- a/src/HYDROData/HYDROData_SinusX.cxx +++ b/src/HYDROData/HYDROData_SinusX.cxx @@ -1,8 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -37,6 +33,7 @@ #include #include #include +#include HYDROData_SinusX::HYDROData_SinusX( ) { @@ -151,6 +148,7 @@ void HYDROData_SinusX::SXToHydro(Handle(HYDROData_Document) theDocument, NCollec aPolyXY->SetName(GetName(myCurveBlocks[i].myName + "_polyXY")); aProfileUZ->SetName(GetName(myCurveBlocks[i].myName + "_profileUZ")); aProfile->SetName(GetName(myCurveBlocks[i].myName + "_profile")); + aPolyXY->SetWireColor(HYDROData_PolylineXY::DefaultWireColor()); theEntities.Append(aPolyXY); theEntities.Append(aProfileUZ); theEntities.Append(aProfile); @@ -341,17 +339,17 @@ void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_SequenceIsKind( 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 +361,7 @@ void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_SequenceGetSectionType(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";