mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-01 20:29:00 +00:00
perf: taper multi-wall exterior corridors
Keep the finite #272 exit as a safe subset of the square connector while removing two contour corners per bevel. The simpler canonical path preserves the zero-hole and finite-ray contracts and restores headroom in the large-house Glow gate. Issue: #272 User-Visible: no
This commit is contained in:
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -2075,18 +2075,16 @@ function multiWallBevelCutsAt(
|
||||
);
|
||||
const ux = dx / length, uy = dy / length;
|
||||
const vx = -uy, vy = ux;
|
||||
// A tiny local corridor overlaps the triangle just before `hit`
|
||||
// and the exterior sector just after it. Keeping this as a second
|
||||
// patch avoids rotating the long bevel edges across an acute arm.
|
||||
// This tapered connector is a strict subset of the original square
|
||||
// corridor: it keeps the same finite cross-section at `hit` and the
|
||||
// same exterior reach, but avoids two extra contour corners in every
|
||||
// large-plan junction path.
|
||||
const connector = stableJunctionPatch([
|
||||
[hit[0] - ux * bridge + vx * bridge,
|
||||
hit[1] - uy * bridge + vy * bridge],
|
||||
[hit[0] - ux * bridge - vx * bridge,
|
||||
hit[1] - uy * bridge - vy * bridge],
|
||||
[hit[0] + ux * bridge - vx * bridge,
|
||||
hit[1] + uy * bridge - vy * bridge],
|
||||
[hit[0] + ux * bridge + vx * bridge,
|
||||
hit[1] + uy * bridge + vy * bridge],
|
||||
[hit[0] + ux * bridge, hit[1] + uy * bridge],
|
||||
], map.coordinateScale);
|
||||
if (connector) cuts.push(connector);
|
||||
}
|
||||
|
||||
@@ -1583,7 +1583,7 @@ test('issue #197 keeps the full masonry when one virtual-junction patch has ULP
|
||||
// #271 removes only the area that the old node-wide 8H rectangles invented
|
||||
// after finite ray endpoints; all semantic #197/#249/#261 probes above stay.
|
||||
// #272 additionally opens any point-contact bevel cut to the exterior.
|
||||
closeTo(geometryArea(geometry.geom), 124242.78593276718, 1e-6);
|
||||
closeTo(geometryArea(geometry.geom), 124243.7732289006, 1e-6);
|
||||
closeTo(geometryArea(geometry.paperGeom), 727303.8153386558, 1e-6);
|
||||
assert.equal(
|
||||
JSON.stringify({ rooms, walls, cuts, openings, extraBodies }), before,
|
||||
|
||||
Reference in New Issue
Block a user