diff --git a/src/App/ObjectIdentifier.cpp b/src/App/ObjectIdentifier.cpp index f2ed2e009..b22285c2b 100644 --- a/src/App/ObjectIdentifier.cpp +++ b/src/App/ObjectIdentifier.cpp @@ -26,6 +26,9 @@ # include #endif +#include +#include + /// Here the FreeCAD includes sorted by Base,App,Gui...... #include "Property.h" #include "Application.h" @@ -912,9 +915,9 @@ void ObjectIdentifier::setValue(const boost::any &value) const ss << getPythonAccessor() + " = "; if (value.type() == typeid(Base::Quantity)) - ss << boost::any_cast(value).getValue(); + ss << std::setprecision(std::numeric_limits::digits10 + 1) << boost::any_cast(value).getValue(); else if (value.type() == typeid(double)) - ss << boost::any_cast(value); + ss << std::setprecision(std::numeric_limits::digits10 + 1) << boost::any_cast(value); else if (value.type() == typeid(char*)) ss << '\'' << Base::Tools::escapedUnicodeFromUtf8(boost::any_cast(value)) << '\''; else if (value.type() == typeid(const char*))