Repository navigation
Port the six Figure-2 screen geometries from the HTML tool - #7
Merged
Merged
Conversation
New geometry.py mirrors the tool's GEOMETRIES block: disc, panel, box, cylinder (T-screen body), cone, and half-barrel, each with its gross surface-area formula (Figure 2, §3.7) and closed-form dimension solver. size_screen() supports the tool's two modes: solve one free dimension against the required gross area (rounded UP to a 1 mm build increment — never down, so rounding can't turn a pass into a fail) or check fully-fixed dimensions PASS/FAIL. --units N splits the required area across identical screen units. CLI: --geometry/--dim KEY=METRES/--solve-for/--units on single-intake runs; JSON output gains a nested geometry object. Not yet wired into batch CSV mode (tracked). The tool's extra de-rating factors (fouling, submergence, support blockage) stay out of scope — the package models de-rating through its open-area ratio and blockage allowance. Tests 26 -> 42: per-shape area formulas, solve round-trips for every dimension of every shape, round-up behaviour, unit splitting, check-mode verdicts, impossible-solve and bad-input errors, CLI paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last substantive Milestone PY item (only the v0.1.0 tag remains).
geometry.pymirrors the HTML tool'sGEOMETRIESblock: disc, panel, box, cylinder (T-screen body), cone, and half-barrel, each with its gross surface-area formula (Figure 2, §3.7) and closed-form dimension solver.size_screen()supports the tool's two modes: solve one free dimension against the required gross area — rounded up to a 1 mm build increment, never down, so rounding can't turn a pass into a fail — or check fully-fixed dimensions with a PASS/FAIL verdict.unitssplits the required area across identical screen units.--geometry,--dim KEY=METRES(repeatable),--solve-for,--unitson single-intake runs;--jsongains a nestedgeometryobject. Batch CSV mode doesn't support geometry yet (tracked as a follow-up).Test plan
uv run pytest: 42/42 passing (was 26) — per-shape area formulas checked against Figure 2, solve round-trips for every dimension of every shape, 1 mm round-up + re-check sufficiency, unit splitting, check-mode PASS/FAIL, impossible-solve (negative box width) and bad-input errors, CLI solve/check/JSON/error pathsuv run ruff check .anduv run mypyclean; CI runs the same gates🤖 Generated with Claude Code