Collection of engineering calculation projects (Python + Typst), each with input, calc script, tests, results, and generated PDF where available.
3.6 KiB
3.6 KiB
Codemap: concentric-footing
Hybrid (Typst + Python) structural calculation that checks a square, concentrically loaded reinforced-concrete spread footing per ACI 318-19: soil bearing, one-way shear, two-way (punching) shear, flexure, minimum steel, and concrete bearing. calc.py is the single source of truth; footing.typ presents only.
Generated: 2026-08-21 Files indexed: 13 (all deliverables present)
Layout
calcs/concentric-footing/
├── calc.py [logic] — ACI 318-19 footing checks; Pint YAML → compute() → results.json; CLI --input/--output/--stdout.
├── input.yaml [config] — Pint-quoted quantities; Blavatnik defaults (Ps, Pu, qa, Bf, Df, cover, fc, fy, lambda, column_width, base_plate_width, N, rebar_size).
├── results.json [state] — last calc output: {tool, version, project, prepared_by, values, checks}.
├── test_concentric_footing.py [test] — pytest lock of corrected ACI 318-19 benchmark (12 tests); imports calc.py:compute via importlib.
├── footing.typ [logic] — Typst presentation sheet; imports lib/sheet.typ + results.json, derives loads, emits <concentric-footing-loads>/<concentric-footing-results>.
├── generated/footing.pdf [doc] — compiled artefact (~204 KB).
├── CONCENTRIC-FOOTING.pdf [doc] — reference: Blavatnik square footing 36in×36in×12in, 3000 psi, 4-#4 (contains known 68in vs 92in perimeter typo).
├── PROJECT_STATE.md [doc] — architecture, pinned equations, units, tolerances, corrected benchmark, known limitations.
├── TASKS.md [doc] — 5-task plan (001 numerical core, 002 pytest lock, 003 Typst sheet, 004 docs, 005 review).
└── tasks/
├── 001_calc_and_input.md [doc] — numerical core spec (calc.py + input.yaml + results.json).
├── 002_numerical_tests.md [doc] — pytest lock spec (test_concentric_footing.py, compute() only).
├── 003_typst_sheet.md [doc] — Typst presentation spec (footing.typ + compile + metadata query tests).
├── 004_docs_refresh.md [doc] — README + codemap refresh spec.
└── 005_review.md [doc] — reviewer pass spec (engineering + deterministic evidence + simplify).
(footing.typ and generated/footing.pdf are now present on disk — see layout above.)
Hot Spots
calcs/concentric-footing/calc.py— single source of truth for all six ACI 318-19 checks; any equation change must be reconciled withtest_concentric_footing.pyand the benchmark inPROJECT_STATE.md.calcs/concentric-footing/PROJECT_STATE.md— pins every equation, unit, tolerance, and the corrected benchmark; the builder must not invent behavior beyond it.lib/sheet.typ(in worksheets root, external) — sharedcalc-line/checkhelpers used byfooting.typ; changing them breaks every sheet's PDF.
Conventions
- Hybrid Pint pattern:
input.yaml(quoted quantity strings) →calc.py:compute()→results.json{tool, version, project, prepared_by, values, checks} →footing.typ(presents only, no recomputation) → PDF compiled with--root .fromworksheets/. - Load determination (DL/LL, tributary area, column self weight) is derived in Typst and emitted as
<concentric-footing-loads>; Python reads checkedPs/Pu. The test suite reconciles them. - Pin one hand-calculated example in
pytest.approxbefore treating the tool as stable; correct reference typos in the Scope note rather than reproducing them.