#9945 - Show length of edges in measurement tool
This commit is contained in:
parent
f708d9fcb9
commit
b4b59cb7d2
@ -1993,6 +1993,13 @@ void GLGizmoMeasure::on_render_input_window(float x, float y, float bottom_limit
|
|||||||
radius = ObjectManipulation::mm_to_in * radius;
|
radius = ObjectManipulation::mm_to_in * radius;
|
||||||
text += " (" + _u8L("Diameter") + ": " + format_double(2.0 * radius) + units + ")";
|
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;
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user