ui: a selected design edge is drawn over the mesh too (#338)

Meshes that do not tag their element edges with the design's edge names
(tet, hex, blocks) left a selected edge with no highlight while the mesh
was shown. The edge is now marked along its own polyline, which the scene
already draws over the mesh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 09:27:39 -04:00
1 parent 8ba59701b4
commit d78a4c2e52
1 file changed
+4 -8
+4 -8
View File
@@ -389,11 +389,6 @@ impl Picker<'_> {
}
}
/// Element faces are drawn: the geometry is drawn along the mesh.
fn elements_drawn(&self) -> bool {
self.elements && !self.display.tris.is_empty()
}
/// The drawn faces' triangles (for a depth map).
fn drawn(&self) -> impl Iterator<Item = [Vec3; 3]> + '_ {
let e = self.display.tris.iter().filter(|_| self.elements).map(|t| t.p);
@@ -670,9 +665,10 @@ impl Picker<'_> {
}
}
outline(s, first, color);
// Over element faces a design edge is marked along the mesh's edges on it (below), which
// lie on the faces; its own polyline lies off them by the tessellation's chord error.
if m.edges && self.curves && !self.elements_drawn() {
// A design edge is marked along its own polyline, which the scene draws over the mesh too
// (most meshes do not tag their element edges with the design's edge names), and along
// the mesh's edges a mesh does tag with it (below).
if m.edges && self.curves {
// Which edges of each drawn body are marked, worked out once per edge.
let marked: Vec<Vec<bool>> = self
.names