Commit Graph
17 Commits
Author SHA1 Message Date
TheRON 38ea024fdc geom: Shapely-backed region layer
Booleans, decomposition, area, simplicity, hull, bounds, mitred offset
and vertex cleaning. Booleans go to GEOS, which is the reason Shapely was
chosen. The decomposition does not.

BOSL2 region_parts counts by nesting parity, not connectivity: a path
takes a level from how many others contain the midpoint of its first
edge, even levels are outer boundaries, their odd children are holes.
SECTION_PARTS == 1 is an exact assertion, and Shapely agreeing with that
count is a coincidence that holds for well-formed input and not
otherwise, so the decomposition is transcribed and both the part count
and the area derive from it.

is_region_simple is treated as a manifold precondition rather than a
diagnostic. An outline that touches itself measures perfectly and cannot
be tessellated, so it must fail here and not at export.

Developed against Shapely 2.1.2 / GEOS 3.13.1, matching CT 100. Boolean
results on near-degenerate geometry can shift between GEOS releases; if
the oracle ever disagrees by one part after an upgrade, look there first.

39 tests, all arithmetic on rectangles. Mutation run found a real gap:
nothing distinguished on-boundary from outside in the nesting probe until
a shared-edge case was added. Eight mutations now caught.

Oracle acceptance still skips; 236 unchanged.
2026-08-19 03:30:03 -05:00
TheRON 545eee7217 geom: port BOSL2 round_corners and path cleanup
Shapely has no corner rounding, so the round_corners -> _circlecorner ->
arc -> segs chain is transcribed from BOSL2 at the pinned commit
92d697c2, read from source rather than recalled. Also deduplicate,
path_merge_collinear, is_collinear and approx, which the cleanup path
depends on.

Segment counts are contract, not a quality setting. An arc becomes
straight segments and the count sets the enclosed area, compared against
the oracle at 1e-3 mm2 -- and the extruded solid is those segments, so
this is the definition of the surface. Both generators set $fn = facets
with facets = 48 and no oracle case overrides it, so segmentation
depends on swept angle alone. A right angle gives 12 points.

round_corners raises where BOSL2 asserts, rather than clamping: silently
fitting a roundover the reference refused would diverge without any
visible failure. sb_corner_radii exists to derive safe radii up front.

33 tests. The exact-fit boundary raises rather than passing, because
tan(45) is under 1 in both languages -- a test asserting the tidy
behaviour would have looked right and been wrong. Mutation run found a
real gap: nothing exercised the three-point floor on blunt corners until
a 170-degree case was added. Seven mutations now caught.

Oracle acceptance still skips; 236 unchanged.
2026-08-19 03:18:52 -05:00
TheRON dfd02a4fd8 geom: port the pure-geometry half of sb-geom
Vectors, GEO and MEMBER records, member placement, sleeve and cavity
paths, exact polyline distance, corner-radius derivation, and the
monotone solver. Direct translation of legacy/openscad/lib/sb-geom.scad
at rev 8.0.0.

Angles stay in degrees, matching OpenSCAD, so every expression reads the
same as its source line. The 44 solver iterations, the 0.999 and 0.98
scale factors, the 0.05/179.95 cutoffs and the 1e9 sentinel are
reproduced exactly: they shaped the frozen oracle.

Region operations are not included -- they need a 2D boolean kernel and
follow with the Shapely layer.

49 unit tests, none of which touch the oracle. Harness proven by
mutation: radians for degrees, a shortened solver, a dropped scale
factor, a skipped crossing test and a flipped offset sign are each
caught. Oracle acceptance still skips; 236 unchanged.
2026-08-19 02:58:35 -05:00
TheRON b67cc1290e verify.sh: reach the restore on the diff branch
set -euo pipefail aborted the script on the diff pipeline one line
before the cp that restores the pre-run oracle, so --full left a
regenerated fixture file in the working tree while printing that
nothing had been overwritten. Appended || true.

Recorded as F-033. The fix is not yet exercised: the restore branch
runs only under --full and has not been entered since the change.
2026-08-19 01:10:08 -05:00
TheRON 1d3eed07cd Handover push 2026-08-18 14:36:25 -04:00
TheRON 6967eef59c Conformance updates. 2026-08-18 10:33:26 -04:00
civicus-build c7e32d8e07 Seed repository: rev-8.0.0 reference, frozen oracle, toolchain, test harness
Reference implementation of the strap-beam generators at revision 8.0.0, kept
so the acceptance oracle can be regenerated. Not a live target; the running
application has no OpenSCAD dependency.

The oracle holds 123 frozen cases, 113 accepted and 10 rejected, produced by
OpenSCAD 2021.01 with BOSL2 at 92d697c2. The ten rejections are part of the
contract: a port that accepts them is wrong.

tests/test_oracle.py specifies the port API and was written before the port,
so the interface follows from what must be verified rather than what is
convenient to implement. Proven by adversarial stub: a build() that rejects
everything passes all 10 rejection tests and fails all 226 acceptance tests.
2026-08-18 07:30:17 -05:00
TheRON eb0d533d86 Updated PROCESSS.md 2026-08-18 07:36:39 -04:00
TheRON 3e7e7c934d Added PROCESS.md 2026-08-17 12:50:12 -04:00
TheRON bcec11cf43 Final configuration 2026-08-17 11:48:32 -04:00
TheRON 673d5f26ac mail relay configured 2026-08-17 08:25:14 -04:00
TheRON e67988eef5 Updated 2026-08-16 20:25:18 -04:00
TheRON eac601ed99 Current state
Live state of the Mechanical Compiler staging instance on `srv-b`.
2026-08-16 12:01:20 -04:00
TheRON a00ba35451 Roadmap
What the Mechanical Compiler is for, and the order in which it gets built.
2026-08-16 12:00:42 -04:00
TheRON 1672971143 Failure records
Append-only record of every failure encountered building the Mechanical
Compiler environment.
2026-08-16 12:00:08 -04:00
TheRON 318a2e30dc Provisioning specifications
This specifies a **staging environment** on `srv-b`, plus the promotion path to
a production host that does not yet exist.
2026-08-16 11:59:08 -04:00
TheRON e85c4f4e5b Initial commit 2026-08-14 09:21:31 -04:00