X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Bathymetry.cxx;h=15401f0ab37de92ae857dbd226f9c49cfd67242d;hb=4d4d74dd554819c30f1c8ded5520cc6c25aba56b;hp=73e763ef27ac061a40fb2c287de62773f01df5ba;hpb=e744ba34fd38d6744d11b54cd15b6f86350695b2;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index 73e763ef..15401f0a 100644 --- a/src/HYDROData/HYDROData_Bathymetry.cxx +++ b/src/HYDROData/HYDROData_Bathymetry.cxx @@ -21,8 +21,6 @@ #include "HYDROData_Tool.h" #include "HYDROData_PolylineXY.h" -#include - #include #include @@ -56,20 +54,21 @@ HYDROData_Bathymetry::~HYDROData_Bathymetry() { } -QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +QStringList HYDROData_Bathymetry::DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects ) const { QStringList aResList = dumpObjectCreation( theTreatedObjects ); QString aBathymetryName = GetObjPyName(); - aResList << QString( "%1.SetAltitudesInverted( %2 );" ) + aResList << QString( "%1.SetAltitudesInverted( %2 )" ) .arg( aBathymetryName ).arg( IsAltitudesInverted() ); TCollection_AsciiString aFilePath = GetFilePath(); - aResList << QString( "%1.ImportFromFile( \"%2\" );" ) + aResList << QString( "%1.ImportFromFile( \"%2\" )" ) .arg( aBathymetryName ).arg( aFilePath.ToCString() ); aResList << QString( "" ); - aResList << QString( "%1.Update();" ).arg( aBathymetryName ); + aResList << QString( "%1.Update()" ).arg( aBathymetryName ); aResList << QString( "" ); return aResList; @@ -477,9 +476,9 @@ bool HYDROData_Bathymetry::importFromXYZFile( QFile& theFile, if ( !isXOk || !isYOk || !isZOk ) return false; - if ( boost::math::isnan( aPoint.X() ) || boost::math::isinf( aPoint.X() ) || - boost::math::isnan( aPoint.Y() ) || boost::math::isinf( aPoint.Y() ) || - boost::math::isnan( aPoint.Z() ) || boost::math::isinf( aPoint.Z() ) ) + if ( HYDROData_Tool::IsNan( aPoint.X() ) || HYDROData_Tool::IsInf( aPoint.X() ) || + HYDROData_Tool::IsNan( aPoint.Y() ) || HYDROData_Tool::IsInf( aPoint.Y() ) || + HYDROData_Tool::IsNan( aPoint.Z() ) || HYDROData_Tool::IsInf( aPoint.Z() ) ) return false; // Invert the z value if requested