feat(solid history): Ctrl+click picks a composite's solid; show history draws them

Ctrl+click on a composite selects it with the solid under the cursor as
the one its palette and grips edit: the solid whose own surface passes
through the picked point. With its history shown, a composite draws the
edges of the solids its booleans joined, each where it sits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-07 12:51:32 +03:00
1 parent 43bd5aa427
commit 33640e050d
4 files changed
+163 -1

No files matched your search

+32
View File
@@ -162,6 +162,11 @@ pub(crate) fn tessellate_entity(
}
wires.extend(construction);
}
for points in model::solid_history::composite_history_edges(document, handle) {
let selected = selected.contains(&handle);
let color = [1.0, 0.25, 0.25, 1.0];
wires.push(WireModel::solid_f64(handle.value().to_string(), points, color, selected));
}
}
wires
}
@@ -10557,6 +10562,33 @@ impl Scene {
)
}
/// The solid under the cursor and where the pick ray meets it.
pub fn solid_click_hit_point(
&self,
cursor: iced::Point,
view_rot: glam::Mat4,
eye: glam::DVec3,
bounds: iced::Rectangle,
) -> Option<(Handle, glam::DVec3)> {
let meshes = self.interaction_meshes_arc();
pick::hit_test::mesh_click_handle_point(
cursor,
meshes.iter().filter_map(|set| {
let handle = set.entity_handle()?;
let mesh = set.geometry_lods().first()?;
Some((
handle,
mesh,
set.instance_transform,
mesh_interaction_aabb(set)?,
))
}),
view_rot,
eye,
bounds,
)
}
pub fn solid_planar_face_normal_at(
&mut self,
handle: Handle,