From a8aa7896a4cf8595c9072ba56f06685ebe3d843a Mon Sep 17 00:00:00 2001 From: Antoine Lavenant Date: Tue, 9 Oct 2018 14:02:44 +0200 Subject: [PATCH] fix precision numeric for stl writer --- src/osgPlugins/stl/ReaderWriterSTL.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osgPlugins/stl/ReaderWriterSTL.cpp b/src/osgPlugins/stl/ReaderWriterSTL.cpp index d27048ce2..57fb93b4b 100644 --- a/src/osgPlugins/stl/ReaderWriterSTL.cpp +++ b/src/osgPlugins/stl/ReaderWriterSTL.cpp @@ -359,6 +359,7 @@ private: else *m_stream << "facet normal " << vNormal[0] << " " << vNormal[1] << " " << vNormal[2] << std::endl; *m_stream << "outer loop" << std::endl; + *m_stream << std::fixed << std::setprecision(7); *m_stream << "vertex " << v1[0] << " " << v1[1] << " " << v1[2] << std::endl; *m_stream << "vertex " << v2[0] << " " << v2[1] << " " << v2[2] << std::endl; *m_stream << "vertex " << v3[0] << " " << v3[1] << " " << v3[2] << std::endl;