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:
Sergey Matyunin
2026-08-24 00:10:57 +03:00
parent 22d0f05650
commit b05eb68c3a
4 changed files with 10 additions and 12 deletions
+5 -7
View File
@@ -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);
}