tests: skip the bore_bracket keel check where web/dev-models is absent (CI)

The model is in the gitignored dev-models folder, so CI failed reading it. It
still runs locally, where the sweep covers the same part.
This commit is contained in:
matthewtrahan committed 2026-09-24 14:19:34 -05:00
1 parent ac369c9057
commit a972a06a66
2 files changed
+11 -4

No files matched your search

+2 -1
View File
@@ -110,7 +110,8 @@ no stress models needed):
a wider strip keeps it and adds a wall each side;
- at **every tilt from 46° to 85°**: a fin on the lowest line reaching the plate, no
wedge stilts beside it, and side walls in mirrored pairs, each nearly the strip's length;
- never in a pocket: bore_bracket keeps the wedges that grip it from 1.2 mm.
- never in a pocket: bore_bracket keeps the wedges that grip it from 1.2 mm (skipped
where `web/dev-models/` is absent, as in CI: those models are gitignored).
See `docs/FIN-SPEC.md` for the spec these encode. `prototype/stress/run.js` is the
broader sweep (all models × poses) for eyeballing; this suite is the pass/fail gate.
+9 -3
View File
@@ -61,17 +61,23 @@ Deno.test('keel: a wider strip keeps the fin on the lowest line and adds one eac
assert(b.unserved === 0, `${b.unserved} regions unserved`);
});
Deno.test('keel: never in a pocket -- bore_bracket keeps the wedges that grip it low', () => {
// bore_bracket lives in web/dev-models/, which is gitignored (private and third-party
// parts), so CI skips this; it runs wherever the model is present, as the sweep does.
const BORE = new URL('../web/dev-models/bore_bracket.stl', import.meta.url);
let haveBore = true;
try { Deno.statSync(BORE); } catch { haveBore = false; }
Deno.test({ name: 'keel: never in a pocket -- bore_bracket keeps the wedges that grip it low', ignore: !haveBore, fn: () => {
// A small curved region (a bore) is lowest along a line too; a keel there
// displaced the wedges that gripped this part from 1.2mm up.
const pos = readSTL(Deno.readFileSync(new URL('../web/dev-models/bore_bracket.stl', import.meta.url)));
const pos = readSTL(Deno.readFileSync(BORE));
const topo = buildTopology({ getAttribute: (k) => (k === 'position' ? { array: pos } : null) });
globalThis.__TINECAP = [];
fins.buildFins(topo, analyze(topo, 45, rotX(45)), rotX(45), { mode: 'auto', bedPad: true, tines: true, coverage: 1 });
const low = Math.min(...globalThis.__TINECAP.map((t) => t.z));
globalThis.__TINECAP = undefined;
assert(low < 2, `lowest tine at ${low.toFixed(1)}mm, want the wedges' 1.2mm`);
});
} });
Deno.test('keel: at EVERY tilt from 46 to 85deg, a fin on the lowest line from the plate to the top', () => {
// Not just the tilts the picture used: at 45-49deg the strip is too shallow to