room settings button: the VISUAL centre for L-shaped rooms

The owner's kitchen-living room is L-shaped, and interiorPoint() only
promises 'somewhere inside' — the button sat near the seam, visibly
off-centre. poleOfInaccessibility() (largest inscribed circle, grid search
plus one refinement pass) puts it in the middle of the widest open space:
the slab of an L, the exact centre of a rectangle or square. Cached per
poly array in a WeakMap — the memoized model keeps the arrays stable, so
the search runs once per geometry, not per render.

Unit: square -> centre; thick-slab L -> mid-slab, always inside.
This commit is contained in:
Matysh
2026-07-29 13:55:03 +03:00
parent 0bb9282edd
commit 9eec856d50
5 changed files with 84 additions and 14 deletions
+4 -4
View File
File diff suppressed because one or more lines are too long