diff --git a/src/Mod/TechDraw/App/DrawUtil.cpp b/src/Mod/TechDraw/App/DrawUtil.cpp index 562e464a11..1061ae50ba 100644 --- a/src/Mod/TechDraw/App/DrawUtil.cpp +++ b/src/Mod/TechDraw/App/DrawUtil.cpp @@ -317,6 +317,16 @@ std::string DrawUtil::formatVector(const gp_Vec& v) return result; } +std::string DrawUtil::formatVector(const gp_Pnt& v) +{ + std::string result; + std::stringstream builder; + builder << std::fixed << std::setprecision(3) ; + builder << " (" << v.X() << "," << v.Y() << "," << v.Z() << ") "; + result = builder.str(); + return result; +} + //! compare 2 vectors for sorting - true if v1 < v2 bool DrawUtil::vectorLess(const Base::Vector3d& v1, const Base::Vector3d& v2) diff --git a/src/Mod/TechDraw/App/DrawUtil.h b/src/Mod/TechDraw/App/DrawUtil.h index 2b538cda8b..485a2c2686 100644 --- a/src/Mod/TechDraw/App/DrawUtil.h +++ b/src/Mod/TechDraw/App/DrawUtil.h @@ -73,6 +73,7 @@ class TechDrawExport DrawUtil { static std::string formatVector(const Base::Vector2d& v); static std::string formatVector(const gp_Dir& v); static std::string formatVector(const gp_Vec& v); + static std::string formatVector(const gp_Pnt& v); static bool vectorLess(const Base::Vector3d& v1, const Base::Vector3d& v2); static Base::Vector3d toR3(const gp_Ax2 fromSystem, const Base::Vector3d fromPoint); static bool checkParallel(const Base::Vector3d v1, const Base::Vector3d v2, double tolerance = FLT_EPSILON);