mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 18:45:55 +00:00
Kernel tests: the five- and six-sided fills are graded by what they make, not their face counts
a_five_sided_window_fills_g1_and_through_a_point required five faces and at least 15 edges (five patches about a centre); a_hexagonal_rim_fills_through _a_point... required (6, 18). How many patches a fill is made of is the fill's own business: both keep their outcome checks (check_face: the rim's own edges, within the face tolerance, a clean mesh; G1 to the wall within 0.1 degree; the point on the surface; the sealed cup holding more than the plain fill's). Both still fail on outcomes: the pentagon's fill through a point has a folded triangle in its mesh, and SMLib's stitch refuses the hexagon's fill through a point (its control net doubles back on itself, a cusp in a curve). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -400,8 +400,6 @@ fn a_five_sided_window_fills_g1_and_through_a_point() {
|
||||
let (open, rim) = pentagon_window();
|
||||
let (fill, r) = patch_edges_report(&open, &rim, &spec(Continuity::G1)).unwrap();
|
||||
report("pentagon g1", &r);
|
||||
// Five patches about a centre: each rim edge in two halves, and five spokes.
|
||||
assert!(fill.face_count() == 5 && fill.edge_count() >= 15, "five patches on the rim's halves and five spokes");
|
||||
check_face("pentagon g1", &open, &fill);
|
||||
let (gap, angle, _) = along_the_loop(&fill, &radial, &|_| 0.0);
|
||||
eprintln!("pentagon g1: along the rim: within {gap:e}, normal within {angle:.5}° of the wall's");
|
||||
@@ -437,12 +435,11 @@ fn a_hexagonal_rim_fills_through_a_point_and_g1_to_walls_meeting_at_angles_holds
|
||||
let open = copy_faces(&solid, &keep).unwrap();
|
||||
let plain = patch_edges(&open, &rim).unwrap();
|
||||
let sealed = |f: &Body| measure(&stitch(&[&open, f], 0.0).unwrap()).unwrap().volume;
|
||||
// Six sides, G0, through a point 3 mm above the middle of the plain fill: six patches about
|
||||
// a centre.
|
||||
// Six sides, G0, through a point 3 mm above the middle of the plain fill: it passes through
|
||||
// the point and seals the cup into a closed solid holding more than the plain fill's.
|
||||
let point = Faces::of(&plain).nearest(Vec3::new(0.0, 0.0, 12.0)).2 + Vec3::Z * 3.0;
|
||||
let (lifted, r) = patch_edges_report(&open, &rim, &PatchSpec { points: vec![point], ..PatchSpec::default() }).unwrap();
|
||||
report("hexagon through a point", &r);
|
||||
assert_eq!((lifted.face_count(), lifted.edge_count()), (6, 18), "six patches on the rim's twelve halves and six spokes");
|
||||
check_face("hexagon through a point", &open, &lifted);
|
||||
let off = Faces::of(&lifted).nearest(point).2.dist(point);
|
||||
eprintln!("hexagon through a point: the point is {off:e} off the surface; sealed {:.2} against {:.2} plain", sealed(&lifted), sealed(&plain));
|
||||
|
||||
Reference in New Issue
Block a user