X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Bathymetry.cxx;h=15401f0ab37de92ae857dbd226f9c49cfd67242d;hb=4d4d74dd554819c30f1c8ded5520cc6c25aba56b;hp=e48d04ffd93f6e3eae9ced1edeb14187b0a66f12;hpb=0938bf07db7972e18753f4ac51226c4a25053fe2;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index e48d04ff..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; @@ -96,7 +95,7 @@ void HYDROData_Bathymetry::SetAltitudePoints( const AltitudePoints& thePoints ) aCoordsArray->SetValue( i * 3 + 2, aPoint.Z() ); } - SetToUpdate( true ); + Changed( Geom_Z ); } HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints(bool IsConvertToGlobal) const @@ -136,7 +135,7 @@ void HYDROData_Bathymetry::RemoveAltitudePoints() if ( !aLabel.IsNull() ) { aLabel.ForgetAllAttributes(); - SetToUpdate( true ); + Changed( Geom_Z ); } } @@ -358,7 +357,7 @@ void HYDROData_Bathymetry::SetAltitudesInverted( const bool theIsInverted, TDataStd_Integer::Set( myLab.FindChild( DataTag_AltitudesInverted ), (Standard_Integer)theIsInverted ); - SetToUpdate( true ); + Changed( Geom_Z ); if ( !theIsUpdate ) return; @@ -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