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>
38 lines
3.4 KiB
XML
38 lines
3.4 KiB
XML
<svg height="474.31457505076196" viewBox="-146.42135623730948 -5 292.84271247461896 118.57864376269049" width="1171.3708498984759" xmlns="http://www.w3.org/2000/svg">
|
|
<rect fill="#ffffff" height="118.57864376269049" width="292.84271247461896" x="-146.42135623730948" y="-5"/>
|
|
<g transform="translate(0, 108.57864376269049) scale(1, -1)">
|
|
<g id="roads">
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="-141.42135623730948" x2="-111.11404660392043" y1="58.57864376269049" y2="33.70607753949096"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="-111.11404660392043" x2="-76.53668647301795" y1="33.70607753949096" y2="15.224093497742643"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="-76.53668647301795" x2="-39.01806440322565" y1="15.224093497742643" y2="3.8429439193538997"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="-39.01806440322565" x2="0" y1="3.8429439193538997" y2="0"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="0" x2="39.01806440322565" y1="0" y2="3.8429439193538997"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="39.01806440322565" x2="76.53668647301795" y1="3.8429439193538997" y2="15.224093497742643"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="76.53668647301795" x2="111.11404660392043" y1="15.224093497742643" y2="33.70607753949096"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="111.11404660392043" x2="141.42135623730948" y1="33.70607753949096" y2="58.57864376269049"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="141.42135623730948" x2="141.42135623730948" y1="58.57864376269049" y2="108.57864376269049"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="141.42135623730948" x2="-141.42135623730948" y1="108.57864376269049" y2="108.57864376269049"/>
|
|
<line stroke="#000000" stroke-linecap="round" stroke-width="0.6" x1="-141.42135623730948" x2="-141.42135623730948" y1="108.57864376269049" y2="58.57864376269049"/>
|
|
</g>
|
|
<g id="parcels">
|
|
<path d="M-96.683,60.704 L-111.114,33.706 L-90.957,22.932 L-76.526,49.93 z" fill="#fff7c2" fill-opacity="0.3" stroke="none"/>
|
|
<line stroke="#6b6b6b" stroke-width="0.4" x1="-96.683" x2="-111.114" y1="60.704" y2="33.706"/>
|
|
<line stroke="#1f5fb4" stroke-width="0.9" x1="-111.114" x2="-90.957" y1="33.706" y2="22.932"/>
|
|
<line stroke="#6b6b6b" stroke-width="0.4" x1="-90.957" x2="-76.526" y1="22.932" y2="49.93"/>
|
|
<line stroke="#bdbdbd" stroke-dasharray="1.6,1.2" stroke-width="0.4" x1="-76.526" x2="-96.683" y1="49.93" y2="60.704"/>
|
|
</g>
|
|
<g id="nodes">
|
|
<circle cx="141.42135623730948" cy="108.57864376269049" fill="#000000" r="0.7"/>
|
|
<circle cx="-141.42135623730948" cy="108.57864376269049" fill="#000000" r="0.7"/>
|
|
<circle cx="-141.42135623730948" cy="58.57864376269049" fill="#000000" r="0.7"/>
|
|
<circle cx="-111.11404660392043" cy="33.70607753949096" fill="#000000" r="0.7"/>
|
|
<circle cx="-76.53668647301795" cy="15.224093497742643" fill="#000000" r="0.7"/>
|
|
<circle cx="-39.01806440322565" cy="3.8429439193538997" fill="#000000" r="0.7"/>
|
|
<circle cx="0" cy="0" fill="#000000" r="0.7"/>
|
|
<circle cx="39.01806440322565" cy="3.8429439193538997" fill="#000000" r="0.7"/>
|
|
<circle cx="76.53668647301795" cy="15.224093497742643" fill="#000000" r="0.7"/>
|
|
<circle cx="111.11404660392043" cy="33.70607753949096" fill="#000000" r="0.7"/>
|
|
<circle cx="141.42135623730948" cy="58.57864376269049" fill="#000000" r="0.7"/>
|
|
</g>
|
|
</g>
|
|
</svg> |