From 1c646c94880fa7bc4cdc8b8906126006e9833238 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 26 Sep 2018 16:37:00 +0200 Subject: [PATCH] fixes 0003427: Measurement tool measures wrongly --- src/Mod/Part/Gui/TaskDimension.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index d796a55cd6..293b16e9e2 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -91,9 +91,12 @@ bool PartGui::getShapeFromStrings(TopoDS_Shape &shapeOut, const std::string &doc Part::Feature *feature = dynamic_cast(objectPointer); if (!feature) return false; - shapeOut = feature->Shape.getValue(); + Base::Placement placement = feature->globalPlacement(); + Part::TopoShape topoShape = feature->Shape.getShape(); + topoShape.setPlacement(placement); + shapeOut = topoShape.getShape(); if (sub.size() > 0) - shapeOut = feature->Shape.getShape().getSubShape(sub.c_str()); + shapeOut = topoShape.getSubShape(sub.c_str()); if (shapeOut.IsNull()) return false; return true;