skills/lab-hardware-cad/references/validation.md
Work through this before telling a user a part is ready to fabricate. Each item names the failure it catches, because a checklist without consequences gets skipped.
gen.py from the current model source.
Catches: a stale artifact that no longer matches the code you just edited.*.manifest.json exists alongside it, and its source.sha256 matches the model file.
Catches: silently editing an exported STEP, which makes the design unreproducible.interfaces block lists every dimension a bundled standard covers, and its
values are the ones the model computed after any --param override. Empty is correct only
when nothing on the part mates with a bundled standard — and then every interface dimension
is named as unchecked in the report instead.
Catches: a static INTERFACES list frozen at import, recording pre-override numbers; and
an interface that silently escaped checking.12.7 nobody can later identify as half an inch.python scripts/gen.py part_model.py --outdir out/
is_valid is true.
Catches: self-intersecting or non-manifold solids that slicers and CAM silently mangle.solid_count is what you expect — usually 1.
Catches: a boolean that failed and left two disjoint lumps, or a feature floating free of
the body.checks() and passes — clear
regions for what must pass through or fit in, material regions for what must remain,
bbox bounds for stated size limits.
Catches: a recess that swallowed its screw seat, a pocket the mating part cannot enter,
a beam corridor with a wall in it, a feature a fillet silently ate — all invisible to
is_valid and the bounding box.python scripts/check.py facts out/part.step
python scripts/check.py geometry out/part.step --model part_model.py
interfaces() and passes
check.py interfaces.
Catches: an interface nobody checked because the outer bounding box could not see it.intent: "envelope".
Catches: a pocket sized to nominal, which fits only the smaller half of conforming parts.verified: false was confirmed against the primary document, or
the user was told it is unconfirmed.
Catches: propagating a derived number as if it were read from the standard.python scripts/check.py interfaces out/part.manifest.json
# one dimension by hand, when it is not declared in the model
python scripts/check.py fit --standard <id> --intent envelope --clearance <mm> --value <dim>=<mm>
python scripts/check.py clearance out/a.step out/b.step --min 0.3
fabrication-limits.md).python scripts/snapshot.py out/part.step --out out/part.png
This step is never waived by the numeric checks passing. is_valid: true with a correct
bounding box is fully consistent with a pocket cut on the wrong face or an inverted mold. Those
errors are obvious in the picture and invisible in the numbers.
Give the user, explicitly:
State the unverified items plainly. A part list with one honest "this dimension needs confirmation" is far more useful than a confident one that is silently wrong.