Files
houseplan-card/test/fixtures/real-plan-second-floor.json
Claude c654e0ec42 test(smoke): masonry of a real plan must not break
Eight closed issues on wall junctions — #271, #272, #275, #276, #277, #278,
\#279, #280 — shipped in beta.9, and the break in the owner's real plan
survived. Every one of them was accepted on synthetic fixtures: a cell-5
mixed-depth T, a rectilinear T with three equal half-depths. On those the fixes
work.

The smoke asks the product itself, through isPointInFill on the wall path,
whether masonry exists where the model promises it. That is independent of both
resolution and the pixel-diff thresholds which miss this class: a 45-step break
on a large plan is a fraction of a per cent of the frame, well under the 0.05
per cent scene tolerance.

Measured on the shipped code: four breaks, 181 grid steps in total, 45.25 each.
That number is derivable rather than incidental — the node joins a 30 cm
exterior wall, a 30 cm spur and an arm five steps long; half-depth 15,
MITRE_LIMIT 4, corridor radius 60, and 60 − 15 = 45 steps are cut out of the
neighbouring 20 cm wall. The corridor eats the masonry, which is what #271 and
\#275 describe.

The fixture is privacy-minimised — neutral room names and ids, no device
bindings — and keeps its coordinates, because they are the point. It lives in
test/fixtures rather than demo/fixtures on purpose: sourceFingerprint hashes the
.mjs of demo/fixtures and demo/golden, so anything added there staleizes the
committed bundle and the screenshot manifest at once. Verified after this
commit: bundle still fresh, screenshots still current.

The debt is recorded as numbers and compared exactly. Better and the test asks
for the numbers to be updated, which proves the improvement; worse and it
catches the regression. Verified by execution in both directions.

Issue: #285
User-Visible: no
2026-08-24 13:02:56 +03:00

528 lines
9.3 KiB
JSON

{
"note": "Privacy-minimised geometry of a real second floor (issue #285 (defect tracked in #284)). Room names and ids are neutral; only geometry, thickness and openings are meaningful. Coordinates are unchanged: they are the point of the fixture.",
"space": {
"id": "real-second-floor",
"title": "Real second floor",
"cell_cm": 1,
"view_box": [
0,
0,
1,
1
],
"settings": {
"show_borders": true,
"show_names": false,
"fill_mode": "custom",
"custom_fill": {
"c": "#607d8b",
"a": 0
},
"glow_enabled": false
},
"rooms": [
{
"id": "room-a",
"name": "Room A",
"poly": [
[
-1.670833333,
1.266666667
],
[
-1.670833333,
-0.208333333
],
[
0.4,
-0.208333333
],
[
0.4,
1.266666667
]
]
},
{
"id": "room-b",
"name": "Room B",
"poly": [
[
2.404166667,
-0.208333333
],
[
2.404166667,
1.266666667
],
[
0.4,
1.266666667
],
[
0.4,
-0.208333333
]
]
},
{
"id": "room-c",
"name": "Room C",
"poly": [
[
-1.670833333,
3.866666667
],
[
-1.670833333,
2.95
],
[
-0.354166667,
2.954166667
],
[
-0.354166667,
3.866666667
]
]
},
{
"id": "room-d",
"name": "Room D",
"poly": [
[
-1.670833333,
2.95
],
[
-1.670833333,
2.0875
],
[
-0.354166667,
2.0875
],
[
-0.354166667,
2.954166667
]
]
},
{
"id": "room-e",
"name": "Room E",
"poly": [
[
-1.670833333,
2.0875
],
[
-1.670833333,
1.266666667
],
[
-0.354166667,
1.266666667
],
[
-0.354166667,
2.0875
]
]
},
{
"id": "room-f",
"name": "Room F",
"poly": [
[
-0.354166667,
2.954166667
],
[
-0.354166667,
2.2875
],
[
1.058333333,
2.2875
],
[
1.058333333,
3.866666667
],
[
-0.354166667,
3.866666667
]
]
},
{
"id": "room-g",
"name": "Room G",
"poly": [
[
1.058333333,
3.866666667
],
[
1.058333333,
2.2875
],
[
2.404166667,
2.2875
],
[
2.404166667,
3.866666667
]
]
},
{
"id": "room-h",
"name": "Room H",
"poly": [
[
-0.354166667,
1.266666667
],
[
2.404166667,
1.266666667
],
[
2.404166667,
1.245833333
],
[
2.904166667,
1.245833333
],
[
2.904166667,
2.308333333
],
[
2.404166667,
2.308333333
],
[
2.404166667,
2.2875
],
[
-0.354166667,
2.2875
]
]
}
],
"walls": [
{
"key": "1.025000,1.266667@0.0000",
"cm": 20,
"a": [
-0.354166667,
1.266666667
],
"b": [
2.404166667,
1.266666667
]
},
{
"key": "1.025000,2.287500@0.0000",
"cm": 20,
"a": [
2.404166667,
2.2875
],
"b": [
-0.354166667,
2.2875
]
},
{
"key": "-0.637500,-0.208333@0.0000",
"cm": 30,
"a": [
-1.670833333,
-0.208333333
],
"b": [
0.4,
-0.208333333
]
},
{
"key": "-0.637500,1.266667@0.0000",
"cm": 20,
"a": [
0.4,
1.266666667
],
"b": [
-1.670833333,
1.266666667
]
},
{
"key": "1.404167,-0.208333@0.0000",
"cm": 30,
"a": [
0.4,
-0.208333333
],
"b": [
2.404166667,
-0.208333333
]
},
{
"key": "1.058333,3.079167@1.5706",
"cm": 20,
"a": [
1.058333333,
2.2875
],
"b": [
1.058333333,
3.866666667
]
},
{
"key": "2.404167,3.079167@1.5706",
"cm": 30,
"a": [
2.404166667,
2.2875
],
"b": [
2.404166667,
3.866666667
]
},
{
"key": "-1.670833,0.529167@1.5706",
"cm": 30,
"a": [
-1.670833333,
1.266666667
],
"b": [
-1.670833333,
-0.208333333
]
},
{
"key": "0.400000,0.529167@1.5706",
"cm": 20,
"a": [
0.4,
-0.208333333
],
"b": [
0.4,
1.266666667
]
},
{
"key": "2.404167,0.529167@1.5706",
"cm": 30,
"a": [
2.404166667,
-0.208333333
],
"b": [
2.404166667,
1.266666667
]
},
{
"key": "0.354167,3.866667@0.0000",
"cm": 30,
"a": [
1.058333333,
3.866666667
],
"b": [
-0.354166667,
3.866666667
]
},
{
"key": "1.733333,3.866667@0.0000",
"cm": 30,
"a": [
2.404166667,
3.866666667
],
"b": [
1.058333333,
3.866666667
]
},
{
"key": "-1.012500,2.954167@0.0033",
"cm": 20,
"a": [
-1.670833333,
2.95
],
"b": [
-0.354166667,
2.954166667
]
},
{
"key": "-1.012500,2.087500@0.0000",
"cm": 40,
"a": [
-1.670833333,
2.0875
],
"b": [
-0.354166667,
2.0875
]
},
{
"key": "-1.012500,3.866667@0.0000",
"cm": 30,
"a": [
-0.354166667,
3.866666667
],
"b": [
-1.670833333,
3.866666667
]
},
{
"key": "2.904167,1.775000@1.5706",
"cm": 30,
"a": [
2.904166667,
1.245833333
],
"b": [
2.904166667,
2.308333333
]
},
{
"key": "-0.354167,1.779167@1.5706",
"cm": 20,
"a": [
-0.354166667,
2.2875
],
"b": [
-0.354166667,
1.266666667
]
},
{
"key": "-1.670833,3.408333@1.5706",
"cm": 30,
"a": [
-1.670833333,
3.866666667
],
"b": [
-1.670833333,
2.95
]
},
{
"key": "-0.354167,3.412500@1.5706",
"cm": 20,
"a": [
-0.354166667,
2.954166667
],
"b": [
-0.354166667,
3.866666667
]
},
{
"key": "-0.354167,2.520833@1.5706",
"cm": 20,
"a": [
-0.354166667,
2.0875
],
"b": [
-0.354166667,
2.954166667
]
},
{
"key": "-1.670833,2.520833@1.5706",
"cm": 30,
"a": [
-1.670833333,
2.95
],
"b": [
-1.670833333,
2.0875
]
},
{
"key": "-1.670833,1.679167@1.5706",
"cm": 30,
"a": [
-1.670833333,
2.0875
],
"b": [
-1.670833333,
1.266666667
]
},
{
"key": "2.654167,1.245833@0.0000",
"cm": 30,
"a": [
2.404166667,
1.245833333
],
"b": [
2.904166667,
1.245833333
]
},
{
"key": "2.654167,2.308333@0.0000",
"cm": 30,
"a": [
2.904166667,
2.308333333
],
"b": [
2.404166667,
2.308333333
]
}
],
"partitions": [
{
"id": "partition-mt2on9ou-0",
"a": [
-1.670833333,
1.266666667
],
"b": [
-1.670833333,
3.866666667
],
"cm": 30
}
],
"openings": []
}
}