Skip to content

Add GitHub CI and an STL regression corpus - #10

Merged
MasoudMiM merged 2 commits into
mainfrom
infra/ci-stl-corpus
Oct 26, 2026
Merged

MasoudMiM merged 2 commits into
mainfrom
infra/ci-stl-corpus

Conversation

@MasoudMiM

Copy link
Copy Markdown
Owner

What

  • Headless CI: pytest matrix on Python 3.10/3.11/3.12, pip install -e .[dev] (no FreeCAD needed — the core is FreeCAD-free).
  • STL regression corpus: five generated fixture parts (fixtures/generate_corpus.py) with analytic volume and feature ground truth:
    • countersunk block, bossed plate, cross-holed block, counterbored plate, stepped-chamfered plate
  • tests/test_corpus.py pins the stable, correct core per part (feature kinds, diameters, depths, coverage floors), asserts mesh volumes match the analytic truth within 1%, and enforces the 1% corrected-volume gate via plan_to_mesh + plan_corrections + apply_corrections.

Notes

  • Known detection gaps are documented in the test module docstring, not asserted: countersink cones on the countersunk block, and the Ø10 cross bore on the cross-holed block (lands in unplanned as an open slot). Pinned separately when closed.
  • Verified locally: 502 passed, 1 xfailed.

….10-3.12, dev extras); five generated fixture parts with analytic volume/feature truth pinned by tests/test_corpus.py on the stable feature core plus a 1% corrected-volume gate (plan_to_mesh + canonical OVER/UNDER corrections)
The least-squares cone fit of the trimesh test cone is only good to
~1e-4, and the achieved precision varies with the numpy/LAPACK build
(numpy 2.3+ drops Python 3.10, so that leg resolves a different numpy
than 3.11/3.12). Assertions at atol=1e-6/1e-8 therefore passed on
3.11/3.12 but failed on 3.10 in CI. Loosen the four affected cone-fit
assertions to 1e-3 (~4x margin over the worst observed deviation)
while keeping the geometric intent of each test intact.
@MasoudMiM
MasoudMiM merged commit 7ef78cc into main Oct 26, 2026
3 checks passed
@MasoudMiM
MasoudMiM deleted the infra/ci-stl-corpus branch October 26, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant