BND — boundary diagnostics
A boundary is not a thing but a relation between two spaces. The wall centerline segment is derived from that relation and the layout of both spaces, so a way of writing under which the relation does not stand produces no segment at all. These six catch that.
A boundary between two touching spaces is derived as a wall whether or not you write it. You write a boundary to declare an exception (type:open, air:1) or to hang an attribute, an opening or a seg on it.
| Code | severity | One line |
|---|---|---|
| BND01 | error | A boundary between a space and itself |
| BND02 | error | A duplicate boundary |
| BND03 | error | A wall boundary to a space on a different level |
| BND04 | error | The spaces do not touch, so no boundary can be derived |
| BND05 | warning | Edge-restricted and unrestricted boundaries coexist on one pair |
| BND06 | warning | No edge remains on the perimeter, so the segment is of zero length |
BND07 is a retired number. How to get a code is on Reading a diagnostic.
Every wrong example below exits 1 under koyu check --strict, producing exactly one instance of that code. Paste them and confirm.
BND01 — a boundary between a space and itself
error
grid X 0 3600
grid Y 0 4000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /out exterior
boundary /out /out
A boundary between a space and itself cannot be written: /out
Cause — a boundary is a relation joining two different spaces. The same path was written twice. Copying a line and forgetting to fix one side is almost the whole of it.
Fix — correct the second path to its intended partner.
BND02 — a duplicate boundary
error
grid X 0 3600 7200
grid Y 0 4000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /L1/b room X2..X3 Y1..Y2
boundary /L1/a /L1/b t:120
boundary /L1/a /L1/b type:open
Duplicate boundary: /L1/a | /L1/b (first seen at <absolute path>/bad.muro:line 6)
Cause — there are two boundaries on the same pair of spaces, identical down to the edge restriction. Since the order carries no meaning, neither can be said to win. Even when wall and open contradict as they do here, the later one is not silently taken. The diagnostic's related carries the position of the earlier one.
Fix — consolidate into one. To give different specifications per edge, put edge: on both and restrict them to different edges — differing edges are not a duplicate.
Note — for a boundary carrying a line, the spelling of the line is part of its identity. Drawing two lines on the same pair of spaces — two splayed corners, say — is not a duplicate.
BND03 — a wall boundary to a space on a different level
error
grid X 0 3600 7200
grid Y 0 4000
level L1 0 h:2400 slab:200
level L2 3000 h:2400 slab:200
space /L1/a room X1..X2 Y1..Y2
space /L2/a room X1..X2 Y1..Y2
boundary /L1/a /L2/a t:120
A wall boundary cannot be written to a space on a different level (vertical takes type:stair/shaft/void): /L1/a | /L2/a
Cause — a wall does not stand across storeys. A boundary was written meaning to connect two storeys, but type: was omitted so it defaulted to wall.
Fix — to write a relation between storeys, add type:stair (a stair), type:shaft (a lift and the like) or type:void (a void). Floors are not written — adjacency between storeys is derived automatically from overlap in plan, and the default is a floor. The diagnostics for vertical boundaries themselves are on VRT.
BND04 — the spaces do not touch, so no boundary can be derived
error
grid X 0 3600 7200
grid Y 0 4000 8000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /L1/b room X2..X3 Y2..Y3
boundary /L1/a /L1/b t:120
The spaces do not touch, so no boundary can be derived: /L1/a | /L1/b
Cause — the wall centerline segment is derived from the layout of the two spaces. Unless they touch in a way from which it can be derived, the boundary relation does not stand up. The commonest case is touching only at a corner. Here /L1/a is X1..X2 Y1..Y2 and /L1/b is X2..X3 Y2..Y3; they share only the point (X2, Y2) and no edge of any length. Without a shared edge of nonzero length, they are not "touching". Coordinates that are simply off — writing Y3..Y4 where Y2..Y3 was meant — give the same symptom.
Fix — draw the two rectangles on paper and confirm whether they share an edge. If not, correct the layout. If you really want to connect two rooms that are apart, declare the space between them (a corridor, a hall) and split it into two boundaries.
With edge: the body changes. When the pair does touch once the restriction is lifted, the message names the edge on which they actually touch.
grid X 0 3600 7200
grid Y 0 4000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /L1/b room X2..X3 Y1..Y2
boundary /L1/a /L1/b edge:N t:120
No shared edge on edge:N: /L1/a | /L1/b (they actually touch on E)
Here the mistake is not the layout but one word of compass. edge: is read from the rectangle of the space written first: N=+Y, S=−Y, E=+X, W=−X. X is east-positive and Y is north-positive.
BND05 — edge-restricted and unrestricted boundaries coexist on one pair
warning
grid X 0 3600 7200
grid Y 0 4000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /L1/b room X2..X3 Y1..Y2
boundary /L1/a /L1/b t:120
boundary /L1/a /L1/b edge:E t:150
The same pair of spaces carries both an edge-restricted and an unrestricted boundary (the segments overlap): /L1/a | /L1/b
Cause — a boundary with no edge points at all the segments of that pair; one with edge:E points at the E side among them. Write both and two boundaries ride on the E side, doubling both the thickness (t) and the specification. It slips past the BND02 duplicate error, but is almost never the intended state.
Fix — if the specification is common to every side, consolidate into the one without edge. To vary per side, write every one with edge:.
Note — the diagnostic's line points at one of the declarations that made the set (the unrestricted one for preference), with the rest in related. Being told only that something coexists somewhere leaves nowhere to go and fix it.
BND06 — no edge remains on the perimeter, so the segment is of zero length
warning
grid X 0 3600 7200
grid Y 0 4000
level L1 0 h:2400 slab:150
space /L1/a room X1..X2 Y1..Y2
space /L1/b room X2..X3 Y1..Y2
space /out exterior
boundary /L1/a /out edge:E t:150
boundary /L1/a /out edge:N t:150
boundary /L1/a /out edge:S t:150
boundary /L1/a /out edge:W t:150
boundary /L1/b /out t:150
No edge remains on the perimeter for edge:E, so the boundary segment is of zero length: /L1/a | /out
Cause — a boundary with a space that has no region (an exterior, say) is what remains of the room's perimeter after removing the intervals that touch other spaces. Here /L1/a's E side is occupied entirely by /L1/b, so nothing remains facing /out. The boundary you wrote points at nothing.
Fix — the edge was mistaken. The compass of edge: is read from the rectangle of the space written first (the a side): N=+Y (north), S=−Y (south), E=+X (east), W=−X (west). Here edge:W is correct. Remove the compass entirely and the boundary points at all three remaining sides.
Note — if that boundary carries an opening or a seg, there is no segment to place it on, so OPN04 / SEG04 come out alongside.