From d78a4c2e52c012a6e00d0544174942c58d698c82 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 15 Oct 2026 08:54:33 -0400 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo --- crates/ui-egui/src/selection.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/selection.rs b/crates/ui-egui/src/selection.rs index ad32196..e137505 100644 --- a/crates/ui-egui/src/selection.rs +++ b/crates/ui-egui/src/selection.rs @@ -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 + '_ { 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> = self .names