From 89e23d1eb0e636ba4b557b7b911691fa4a7b9442 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Fri, 23 Oct 2026 23:38:38 -0400 Subject: [PATCH] record: a body built from a sketch has new edges, with no origins of_faces gave every edge it was not told about the meeting of its two faces. A builder (extrude, revolve, loft, a primitive) has no operands: every face it makes is new, so its edges are new too (EdgeProv: empty when it is new and lies between faces new to the operation), not where profile segments meet. With no operands an edge's origins are only what the builder states. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BnQawySUFx57iaJZq7z1Fm --- crates/kernel/src/record.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/kernel/src/record.rs b/crates/kernel/src/record.rs index 774b36429..1fa9ba382 100644 --- a/crates/kernel/src/record.rs +++ b/crates/kernel/src/record.rs @@ -52,7 +52,8 @@ pub(crate) fn pieces_of(operand: usize, edges: impl IntoIterator) /// `faces` (an operand face shared by several result faces is marked Split), and whose edges come /// from `edges` (by result edge index) where the building code knows them: an operand edge it /// kept or re-made ([`pieces_of`]). Every other edge separates two faces that met nowhere before, -/// so it comes from their meeting ([`meeting`]). +/// so it comes from their meeting ([`meeting`]); an operation with no operands (a body built +/// from a sketch) makes every face and edge new, so its edges have no origins. pub(crate) fn of_faces(result: &Brep, operands: usize, mut faces: Vec, edges: &[Vec]) -> History { mark_shared_split(&mut faces); let edges = edge_faces(result) @@ -61,6 +62,7 @@ pub(crate) fn of_faces(result: &Brep, operands: usize, mut faces: Vec, .map(|(i, between)| { let origins = match edges.get(i) { Some(known) if !known.is_empty() => known.clone(), + _ if operands == 0 => Vec::new(), _ => meeting(&between, &faces), }; EdgeProv { faces: between, origins }