From b4b59cb7d2fb639c94741301b2f79bc2126a148c Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 7 Mar 2023 10:21:58 +0100 Subject: [PATCH] #9945 - Show length of edges in measurement tool --- src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp index ece59beca8..2c1b2cf766 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp @@ -1993,6 +1993,13 @@ void GLGizmoMeasure::on_render_input_window(float x, float y, float bottom_limit radius = ObjectManipulation::mm_to_in * radius; text += " (" + _u8L("Diameter") + ": " + format_double(2.0 * radius) + units + ")"; } + else if (item.feature.has_value() && item.feature->get_type() == Measure::SurfaceFeatureType::Edge) { + auto [start, end] = item.feature->get_edge(); + double length = (end - start).norm(); + if (use_inches) + length = ObjectManipulation::mm_to_in * length; + text += " (" + _u8L("Length") + ": " + format_double(length) + units + ")"; + } return text; };