Pi case test: each standoff is four faces, its walls one face each

The README demo's Raspberry Pi case stands four standoffs on its floor: Extrude2's ring of
radius 3 round a 1.25 hole, patterned by RectangularPattern1. Each is its outer wall, its inner
wall, its top and the floor inside it: four faces. The recorded counts were truck's, which made
each cylindrical wall two halves (six faces a standoff): 25 after feature 6, 43 after the
pattern, and 8 more than now at every step after it. On SMLib each wall is one face closed on
its seam, and the counts are 23, 35, 35, 47, 47, 51, 51, 55, 71 from feature 6 on (the feature
names show it: F6:side:c1, F6:side:c2, F6:top and the floor piece bounded by F6:side:c2 per
standoff). The outer sides stay one face each, and (b) and (c) still agree step by step.

Fixes cli rebuild_topology::pi_case_faces_per_step_at_both_heights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-29 22:42:08 -04:00
committed by Irakli Kourtis
parent 4ebc3d0782
commit 2debdd87ae
@@ -146,9 +146,12 @@ fn a_parameter_edit_rebuilds_like_a_fresh_build_and_reverts_exactly() {
/// wall at 24) into strips along the openings' tops and bottoms.
#[test]
fn pi_case_faces_per_step_at_both_heights() {
// Sketch1 (1) .. RectangularPattern2 (14): the faces once features 1..=k are built.
// Sketch1 (1) .. RectangularPattern2 (14): the faces once features 1..=k are built. Each
// standoff (Extrude2, then three more by RectangularPattern1) is a tube on the floor: its
// outer and inner walls (one face each, closed on its seam), its top, and the floor inside
// it, four faces.
const FACES: [(usize, usize); 13] =
[(2, 6), (3, 10), (4, 19), (5, 19), (6, 25), (7, 43), (8, 43), (9, 55), (10, 55), (11, 59), (12, 59), (13, 63), (14, 79)];
[(2, 6), (3, 10), (4, 19), (5, 19), (6, 23), (7, 35), (8, 35), (9, 47), (10, 47), (11, 51), (12, 51), (13, 55), (14, 71)];
let dir = scratch_dir("pi");
let design: Value = serde_json::from_slice(&std::fs::read(root().join("tests/action_matrix/designs/pi-case.solidcraft")).unwrap()).unwrap();
let at = |height: &str, file: &str| {