engine: geometry.faces.merge, faces meshed as one (virtual topology, #505)

geometry.faces.merge {name, faces} records a face merge in the model;
it is applied after the partitions whenever the design is opened or cut
again, undoes through the journal and is saved with the model. Meshers,
mesh.plan (features and rings see merge:<name>; a merged face is
prismatic when its B-rep faces are), checks and the viewport see one
face, drawn in the warm colour. geometry.faces.merge.delete removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-16 11:09:11 -04:00
1 parent 22d709e604
commit ce02d263c7
17 files changed
+464 -22

No files matched your search

+8 -4
View File
@@ -1135,11 +1135,15 @@ impl ModelApp {
let marked = fieldcraft_engine::view::marked(&self.session);
fieldcraft_engine::view::mark(&mut s, &self.display.1, &marked, theme::rgb(t.error));
}
// What Check Geometry found, in the error colour: its faces where geometry faces are
// drawn, short edges and a dot at each finding over everything.
// Faces merged for meshing, each one face in the warm colour where geometry faces are
// drawn; then what Check Geometry found, in the error colour: its faces, short edges
// and a dot at each finding over everything.
let faces = style != scene::Style::Wireframe && !(show.mesh && !self.display.1.tris.is_empty());
let bodies: Vec<&str> = self.pick.names.iter().map(|n| n.name.as_str()).collect();
if show.geometry && self.plot.1.is_none() && faces {
fieldcraft_engine::view::draw_merged_faces(&mut s, &self.display.1, &self.session, &bodies, theme::rgb(t.warm));
}
if let Some(marks) = fieldcraft_engine::view::geometry_marks(&self.session).filter(|_| show.geometry && self.plot.1.is_none()) {
let faces = style != scene::Style::Wireframe && !(show.mesh && !self.display.1.tris.is_empty());
let bodies: Vec<&str> = self.pick.names.iter().map(|n| n.name.as_str()).collect();
fieldcraft_engine::view::draw_geometry_marks(&mut s, &self.display.1, &bodies, marks, faces, theme::rgb(t.error));
}
let mut datums = Aabb3::EMPTY;
+1
View File
@@ -276,6 +276,7 @@ impl Tokens {
contour: self.contour_stops(),
contour_over: rgb(self.contour_over),
marked: rgb(self.error),
merged: rgb(self.warm),
glyphs: self.glyph_colors(),
}
}