From 62d41a0cfa94e0602ef8e6bbdaeb115b5294b23a Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Fri, 30 Oct 2026 08:12:52 -0400 Subject: [PATCH] Tests: the fill tests evaluate a face's (u, v) on its NURBS form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A face's domain and pcurves are on Face::parameters() (its NURBS form when it has one, the record's documented contract); the general fill tests' quadrature and the pick-order and crown comparisons evaluated Face::surface instead. A fill SMLib recognises as an analytic surface (the 240° window's G0 patch is the cylinder itself) then read its arc-length domain as angles: the quadrature came out 4188.79 for the window's 418.879 (10 × 41.888 of angle against 4.189). Co-Authored-By: Claude Opus 5.5 --- crates/kernel/src/fill.rs | 4 ++-- crates/kernel/src/fill_general_tests.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/kernel/src/fill.rs b/crates/kernel/src/fill.rs index 399fa5823b..8e674a209c 100644 --- a/crates/kernel/src/fill.rs +++ b/crates/kernel/src/fill.rs @@ -1370,7 +1370,7 @@ mod tests { shuffled.swap(0, 1); let (b, _) = fill_rim(&open, &shuffled); let (ra, rb) = (record(&a), record(&b)); - let (sa, sb) = (SurfaceEval::new(&ra.faces[0].surface).unwrap(), SurfaceEval::new(&rb.faces[0].surface).unwrap()); + let (sa, sb) = (SurfaceEval::new(ra.faces[0].parameters()).unwrap(), SurfaceEval::new(rb.faces[0].parameters()).unwrap()); let [[u0, u1], [v0, v1]] = ra.faces[0].domain; let mut gap = 0.0f64; for (x, y) in [(0.2, 0.3), (0.5, 0.5), (0.7, 0.9)] { @@ -1586,7 +1586,7 @@ mod tests { mesh_is_clean(&full); // The middle of the loop's box moved by crown × its diagonal (the bump is 1 there). let (ra, rb) = (record(&plain), record(&full)); - let (a, b) = (SurfaceEval::new(&ra.faces[0].surface).unwrap(), SurfaceEval::new(&rb.faces[0].surface).unwrap()); + let (a, b) = (SurfaceEval::new(ra.faces[0].parameters()).unwrap(), SurfaceEval::new(rb.faces[0].parameters()).unwrap()); let [[bu0, bu1], [bv0, bv1]] = ra.faces[0].domain; let (uc, vc) = ((bu0 + bu1) / 2.0, (bv0 + bv1) / 2.0); let size = (bu1 - bu0).hypot(bv1 - bv0); diff --git a/crates/kernel/src/fill_general_tests.rs b/crates/kernel/src/fill_general_tests.rs index ca5903732e..08e886dea9 100644 --- a/crates/kernel/src/fill_general_tests.rs +++ b/crates/kernel/src/fill_general_tests.rs @@ -43,7 +43,7 @@ impl Faces { b::Loop::Vertex { .. } => None, }) .collect(); - (SurfaceEval::new(&f.surface).unwrap(), f.domain, polys) + (SurfaceEval::new(f.parameters()).unwrap(), f.domain, polys) }) .collect(); Faces { faces }