Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/modules/hydro
[modules/hydro.git] / src / HYDROData / HYDROData_Bathymetry.cxx
index e48d04ffd93f6e3eae9ced1edeb14187b0a66f12..15401f0ab37de92ae857dbd226f9c49cfd67242d 100644 (file)
@@ -21,8 +21,6 @@
 #include "HYDROData_Tool.h"
 #include "HYDROData_PolylineXY.h"
 
-#include <boost/math/special_functions/fpclassify.hpp>
-
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
 
@@ -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