diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index 44db94418759f9972d9e4b23233b9faf25dcf45b..3162fc3dc770e0f5fc810550888f25203ffebc0c 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -495,7 +495,6 @@ void MainWindow::save() FileIO::GMSH::MeshDensityAlgorithm::FixedMeshDensity, point_density, station_density, max_pnts_per_leaf, selected_geometries, false, false); - gmsh_io.setPrecision(std::numeric_limits<double>::digits10); bool const success = gmsh_io.writeToFile(fileName.toStdString()); if (!success) @@ -1062,14 +1061,12 @@ void MainWindow::callGMSH(std::vector<std::string> & selectedGeometries, _project.getGEOObjects(), true, FileIO::GMSH::MeshDensityAlgorithm::AdaptiveMeshDensity, param2, param3, param1, selectedGeometries, false, false); - gmsh_io.setPrecision(std::numeric_limits<double>::digits10); gmsh_io.writeToFile(fileName.toStdString()); } else { // homogeneous meshing selected FileIO::GMSH::GMSHInterface gmsh_io( _project.getGEOObjects(), true, FileIO::GMSH::MeshDensityAlgorithm::FixedMeshDensity, param4, param3, param1, selectedGeometries, false, false); - gmsh_io.setPrecision(std::numeric_limits<double>::digits10); gmsh_io.writeToFile(fileName.toStdString()); } diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp index 9876b1871723bd2624be43f7b3d39e29fa4ceb69..ffc73e69482c105b1a2a66c128a8b00efd8bd916 100644 --- a/Applications/FileIO/Legacy/createSurface.cpp +++ b/Applications/FileIO/Legacy/createSurface.cpp @@ -76,7 +76,6 @@ bool createSurface(GeoLib::Polyline const& ply, FileIO::GMSH::GMSHInterface gmsh_io( geo, false, FileIO::GMSH::MeshDensityAlgorithm::FixedMeshDensity, 0.0, 0.0, 0, geo_names, false, false); - gmsh_io.setPrecision(std::numeric_limits<double>::digits10); // write to random file in temp directory auto geo_file = fs::temp_directory_path() /= BaseLib::randomString(32); diff --git a/Applications/Utils/MeshGeoTools/VerticalSliceFromLayers.cpp b/Applications/Utils/MeshGeoTools/VerticalSliceFromLayers.cpp index e84f0628ad4c59e244767bba33b5c78a3b14e5c3..a439d3f308c4698144b6e09cec3a80214ec5d806 100644 --- a/Applications/Utils/MeshGeoTools/VerticalSliceFromLayers.cpp +++ b/Applications/Utils/MeshGeoTools/VerticalSliceFromLayers.cpp @@ -223,7 +223,6 @@ MeshLib::Mesh* generateMesh(GeoLib::GEOObjects& geo, FileIO::GMSH::GMSHInterface gmsh_io( geo, true, FileIO::GMSH::MeshDensityAlgorithm::FixedMeshDensity, res, 0, 0, gmsh_geo, false, false); - gmsh_io.setPrecision(std::numeric_limits<double>::digits10); gmsh_io.writePhysicalGroups(true); bool const success = gmsh_io.writeToFile(gmsh_geo_name); diff --git a/BaseLib/IO/Writer.cpp b/BaseLib/IO/Writer.cpp index 73b01563fc4e129e3da103f1c448a89f654e091f..ef718453af33414bc99ee5de619b008c5bdd048d 100644 --- a/BaseLib/IO/Writer.cpp +++ b/BaseLib/IO/Writer.cpp @@ -65,10 +65,5 @@ int Writer::writeToFile(std::filesystem::path const& file_path) } return 0; } - -void Writer::setPrecision(unsigned int precision) -{ - out.precision(precision); -} } // namespace IO } // namespace BaseLib diff --git a/BaseLib/IO/Writer.h b/BaseLib/IO/Writer.h index 3ea1e50bc4e335936502dc8ad42abd40c06fa23e..7937aa93502a5739ba508fa5881ce132d6311350 100644 --- a/BaseLib/IO/Writer.h +++ b/BaseLib/IO/Writer.h @@ -23,8 +23,7 @@ namespace BaseLib namespace IO { /// @brief Base class which enables writing an object to string, stringstream -/// or file. Also formatting (precision, scientific notation of decimal values) -/// can be set. +/// or file. /// /// When subclassing you only need to implement void write() in which you have /// to write to out. @@ -40,9 +39,6 @@ public: /// @brief Writes the object to the given file. int writeToFile(std::filesystem::path const& file_path); - /// @brief Sets the decimal precision. - void setPrecision(unsigned int precision); - protected: /// @brief Writes the object to the internal stream. /// This method must be implemented by a subclass. diff --git a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp index a83515e5430185eb0a4f5ed3192694048878f247..93c4c7ccd3153d90d87b3c7a055c2c770f3ec09b 100644 --- a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp @@ -311,7 +311,6 @@ bool BoostXmlGmlInterface::write() addSurfacesToPropertyTree(geometry_set); boost::property_tree::xml_writer_settings<std::string> settings('\t', 1); - setPrecision(std::numeric_limits<double>::digits10); write_xml(out, pt, settings); return true; }