Tightens STEP regression coverage for two board-only fixtures that were previously guarded only by a loose meshes.length > 0 OCCT import check.
Adds an exact solidCount assertion after the existing MANIFOLD_SOLID_BREP presence check:
const solidCount = (stepText.match(/MANIFOLD_SOLID_BREP/g) || []).length
expect(solidCount).toBe(1)
Why 1? repro02.json contains source_components (MP1-4, Xpattern1-4) but no pcb_component entries. The STEP converter only generates component boxes for cad_component records. Without those, the board itself is the only solid. A regression that:
…would cause solidCount > 1 and fail this guard.
Adds two new assertions:
expect(stepText).toContain("MANIFOLD_SOLID_BREP") — basic presence check (was missing)solidCount = 1 guard — hole-wrapper pcb_components must never receive fallback boxesWhy 1? All pcb_component entries in repro03.json are subcircuit hole-wrapper containers (obstructs_within_bounds). Restoring the erroneous fallback that generates boxes for these wrappers would push solidCount above 1 and fail the test — exactly the regression repro03 was designed to catch.
| PR | Files changed |
|---|---|
| #94, #97 | basics04, repro01 |
| #96 | basics06, kicad-step |
| #95 | repro04 + production fallback code |
| #98 | Production code (pcb_silkscreen_rect, pcb_smtpad) |
| This PR | repro02, repro03 — untouched by all above |
No conflicts, purely additive test assertions on two fixtures not covered by any open PR.
/claim #6
Mr. Taweechok Plajai
@colorbank
tscircuit
@tscircuit