← back to pin list

Brick 26: Traverse Routing — rapids detour around held slugs

kerfmaster pin list · The interface — recorded intent (build later)

recordStates what the code does today. Auditable against the code — this is the only type that can go stale.

Content last changed 2026-09-02 — computed from the item itself, not typed.

Built 2026-09-02 (Aristide 'go'). The cut-order rule left one lever unbuilt: straight rapids cannot reach zero crossings on a dense design — the remaining move is the rapid PATH. traverse.py (docstring = the design record): visibility graph over clearance-inflated hazard bbox corners, Dijkstra shortest clean path; the edge gate is emit._seg_hits_poly — THE crossing test — so a routed rapid is clean by the same arithmetic that counts crossings; the winner is re-audited with separate arithmetic (exact segment-vs-polygon-edge intersection), and a failed or impossible route falls back to the straight rapid, COUNTED.

The seams. emit.write_gcode_macrob routes every approach rapid (traverse=True default; =False = the legacy single-G0 path, byte-identical). Hazards = pieces already cut and still at bed level: tabbed slugs/part outers AND untabbed over-drop slugs (the traffic rule's loose pieces). Waypoints post as G0G40 moves; stats carry rerouted/unrouted and the emitted-path crossings beside the ordering search's straight count (crossings_straight); the flown path rides in the plan rows (rapid) and the per-contour record (rapid_via) — click-time judgment, canvas and file are ONE path, no drift. pierce_clear.parse_nc reads the path back (pierce = the LAST rapid point); rules.check_tabs judges the rapid the head actually flies on both surfaces — the red slug_traffic clears when the detour cleared it, and still fires with routing off.

Defect caught in the build: check_tabs thinned slug outlines at a fixed [::5], leaving a 6-point rectangle slot degenerate — a rapid straight through a rectangular slug NEVER hit the red rule. The thinning now scales with vertex count; a real pre-existing gap closed by the new controls.

App: the cut plan judges and draws the flown path (routed polyline rapids, '(routed)' on the step, 'rapids routed around held slugs: N'); the 'unbuilt lever' honest notes are closed. Proven: test_traverse.py 10 controls + verify_traverse.js 10 live checks over the public URL (forced bad order over an untabbed over-drop slot routes clean, waypoints in the posted NC, nav209 untouched); all 15 prior suites green.

Honest limits: routing sees the ONE part's hazards — inside a nest sub a detour over a NEIGHBOUR part's slug is the sheet-wide expanded audit's catch, warn never block; the 0.1 detour clearance is a construction margin over the crossing test's own 0.05 sampling, never a machine number — the gate stays the test itself.