TheRON ecac644204 composer: enumerated parameters, and length_view becomes reachable
length_view was in both families' defaults and in neither COMMON_GROUPS, so the
Full Length branch of model_length_mm could not be reached from the composer.
Every model was a 100 mm preview whatever member_length_ft said. Found while
specifying STL export: the sweep must equal model_length_mm(p), the value
already published as LENGTH_MM, or the record's VOLUME_MM3 and MASS_G describe a
different object than the file beside them.

Adding it to the list would have been one line and the wrong fix. The type
coercion falls through to the raw string for anything that is not a bool, int
or float, and model_length_mm compares against the literal "Full Length" and
silently falls back to preview for anything else -- the reference behaved the
same way, so the port is right to keep it. A free-text box would have replaced
an unreachable control with a silent one: "Full Length " with a trailing space
builds a 100 mm model and says nothing.

So ENUM_PARAMS declares which parameters take one of a fixed set of values.
The browser renders a select instead of an input, and a value outside the set
is dropped before the build rather than passed through -- the family default
stands, which is a valid model. The guard sits before the coercion, not after,
where it would be dead code. The next enumerated parameter needs no new
machinery.

Deliberately not mirrored as a check in the families. geometry_checks is shared
with the oracle and the reference accepted any string here; adding a check
there would put the 123 frozen cases at risk to fix a user-interface problem.
The guard belongs in the composer, which is not oracle-bearing.

19 assertions, mutation-proven: removing the guard fails 8 of them. Six are the
parametrised bad values. The other two assert the mechanism rather than its
effect -- that the string never enters values at all, and that the fallback
reaches input_id. Without them, a pass-through that happened to be ignored
downstream would look identical to a working fallback, and a later change to
model_length_mm would turn a passing test into a defect somewhere else.

length_view is a build parameter and stays in both hashes, unlike the author.
Two members of different lengths are different designs, and a test asserts it.

Suite 566 passed, of which 19 are new. None of the 547 moved.
2026-09-12 10:19:47 -05:00
2026-08-14 09:21:31 -04:00

Mechanical Compiler

Build the capacity to construct real structures from reclaimed and commodity materials, using whatever fabrication is actually to hand — 3D printing, tabletop CNC, welding, cement casting, COTS stock.

The reference case is a faceted timber shell: planar panels meeting along straight fold lines, converging on nodes, sitting on a platform. Buildable without a factory, provided someone has worked out what the pieces are and how they meet. That last clause is the project. The Mechanical Compiler exists to make the pieces computable, qualifiable, and reproducible by someone who was not present when they were designed.

Scope

In scope: geometry, qualification, and reproducibility of structural members and their interfaces.

Not in scope: building codes, permitting, jurisdictional approval. Qualification and compliance are different things. A qualification says this member is what it claims to be, made this way, from this stock. Compliance is a jurisdiction-specific argument someone else may build on top.

The project records physical claims, never verdicts — section modulus, moment of inertia, material provenance, process parameters. Those are what any future argument would need. A pass/fail verdict would bake in a jurisdiction we do not want to be bound to. Measure and attest; never adjudicate.

Repository layout

docs/                     specification, state, failure log, roadmap
legacy/openscad/          rev 8.0.0 generators — reference, not a live target
fixtures/                 frozen acceptance oracles
tools/reference-toolchain/  pinned OpenSCAD + BOSL2, build-time only
src/mechcomp/             the application
tests/                    acceptance against the oracle

Read docs/ROADMAP.md first for what this is, then docs/ENVIRONMENT.md for how an instance is built. If you are writing provisioning automation, read docs/FAILURES.md before the specification — every entry is something a script written from the specification alone would have got wrong.

Getting started

make deps            # virtualenv, base + CAD requirements
make verify-oracle   # confirm the frozen oracle is intact
make test            # pytest -n auto

make verify-oracle needs nothing but Python. It should pass on any machine at any time; if it does not, stop.

The oracle

fixtures/strap-beam-8.0.0/ holds 123 frozen cases — 113 accepted, 10 rejected — produced by OpenSCAD 2021.01 with BOSL2 at 92d697c2. It is the acceptance criterion for any reimplementation of the generators.

The ten rejected cases are part of the contract. A port that accepts them is wrong, however good its numbers look elsewhere. It is easy to reproduce the geometry and quietly lose the constraint that made it trustworthy.

The generators under legacy/openscad/ are the reference implementation, kept so the oracle can be regenerated. They are not a live target and the running application has no OpenSCAD dependency.

Provenance

This project's documents, code and roadmap are LLM-generated under human direction. That is stated plainly here and in any downstream submission. We do not obscure it.

The maintainer reviews and owns every line. Anything that could not be defended in a review thread does not ship.

Licence

AGPL-3.0-or-later. See LICENSE.

Section 13 obliges us to offer source to users interacting over a network, so any deployed web tier carries a visible link back to this repository. That is a licence obligation, not a courtesy.

S
Description
No description provided
Readme AGPL-3.0
1.1 MiB
Languages
Python 81%
OpenSCAD 18%
Shell 0.5%
Makefile 0.3%
Dockerfile 0.2%