From 3627641ad4ebb985b7bd4ccc8736c2672e6bffe5 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 13 Mar 2019 16:32:24 +0300 Subject: [PATCH] Fix one more regression in ModelHighAPI_Dumper related to the number of digits written for double values. --- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 3a2e57d39..2bf026285 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -64,10 +64,10 @@ #include // =========== Implementation of storage of dumped data =========== +static const int THE_DUMP_PRECISION = 16; + class ModelHighAPI_Dumper::DumpStorageBuffer : public ModelHighAPI_Dumper::DumpStorage { - static const int THE_DUMP_PRECISION = 16; - public: void addStorage(const ModelHighAPI_Dumper::DumpStoragePtr& theStorage) { myStorageArray.push_back(theStorage); } @@ -418,7 +418,8 @@ void ModelHighAPI_Dumper::DumpStorageGeom::write(const AttributeSelectionPtr& th anIndex = anOutput.str(); } - myDumpBuffer << anIndex << "\", (" + myDumpBuffer << std::setprecision(THE_DUMP_PRECISION) + << anIndex << "\", (" << aMiddlePoint->x() << ", " << aMiddlePoint->y() << ", " << aMiddlePoint->z() << ")"; -- 2.39.2