4 Commits

Author SHA1 Message Date
Dane Sabo
43df8f3ceb M0.5 part 2: OBB regularization + remaining figures
- regularize.rs: ρ=0 no-op, 0<ρ<1 lerp non-frontage verts toward
  OBB-snapped target, ρ=1 full snap to oriented bounding rectangle.
- viz: add fig_03_cul_de_sac, fig_05_acute_corner, plot_subdivision_perf
  (~125 µs/parcel at 25×25 scale), plot_parcel_area_hist (varied-block
  scene so the distribution is actually distributed). fig_07 panels at
  ρ ∈ {0, 0.5, 1.0} on a Y intersection (rectangles are no-ops for OBB).
- subdivide.rs cleanup pass: drop parcels on diff/union/conversion
  fallback paths instead of pushing untracked claims (was admitting
  overlaps). find_frontage_edge_after_clip now takes a tolerance — the
  cleanup pass uses a few-mm window since its inputs are 1mm-snapped.
- tests: bump assert_no_overlapping_parcels tol to 1cm² (the snap grid
  produces ~mm-scale slivers between adjacent parcels at intersection
  centers; still well below min_area).

Closes M1.0 DoD: all named tests pass, all spec figures present, OBB
regularization working, perf at ~0.13 ms/parcel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 13:43:16 -04:00
Dane Sabo
0968572184 M0.5 part 1: geo dep + polygon-difference cleanup, Y overlap fixed
The Y intersection had a real I3 violation that the M0.3 centroid-
only check missed (parcels 0 and 7 overlapped by ~64.5 m²). This
commit:

- adds geo 0.28 as a dependency
- replaces y_intersection_no_overlaps's centroid-in-polygon check
  with a rigorous polygon-polygon intersection test using
  geo::BooleanOps; adds rectangle_no_overlaps_rigorous as a
  positive-control test for the rectangle case
- adds cleanup_block_parcel_overlaps pass at the end of
  subdivide_block: iterate parcels in placement order (corners
  first, regulars after), subtract previously-claimed territory
  from each via geo's polygon difference, drop empties, recover
  frontage edge index and edge_kinds for survivors
- snaps polygon coords to a 1mm grid before handing to geo (helps
  geo's sweep-line invariants); strips collinear-triple and
  near-zero-length-edge artifacts from boolean output before
  feeding back into Polygon::new strict
- wraps difference/union calls in catch_unwind so geo's
  occasional sweep-line panic on degenerate inputs falls back to
  a no-op instead of crashing subdivision

Test status: 24 unit + 24 integration + 1 doc passing. Y figure
visually cleaner — every parcel sits inside its own sub-block, no
visible overlap between sub-blocks.

Self-decisions checklist progress: rigorous I3 testing landed
(checklist item ✓).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 13:26:43 -04:00
Dane Sabo
95b69eddac Untrack build artifacts; add .gitignore; milestone 0.2 + 0.3 progress
Tracked files dropped from 11,756 to ~40 by adding .gitignore and
removing target/, *.aux/log/etc, and .DS_Store from the index.

Code changes since the initial commit:
- Milestone 0.2 (corner parcel rework, sticky back edges,
  preserve-on-deform pipeline, performance instrumentation, new
  Y-intersection and edit before/after figures, journal §11
  session 2 entry).
- Milestone 0.3 in progress: I3 overlap fix at acute corners
  (programmatic test caught a real I3 violation in the Y figure;
  fixed by bisector-clipping regular parcels adjacent to acute
  corners), minimum-change deformation (parcels on a road whose
  *line* didn't change are skipped — only parcels on a road whose
  direction changed are deformed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:45:03 -04:00
Dane Sabo
86b246ead2 initial commit 2026-04-25 14:33:11 -04:00