pub enum PanelKind {
Slope {
wall: EdgeId,
band: u8,
},
Flat,
}Expand description
What part of a roof a Panel is.
Variants§
Slope
A panel rising from one wall.
§Gables
Usually sloping, but not always. A wall given a limit of zero never
moves, so it sweeps no plan area at all, and its face is degenerate —
every corner sits on the wall’s own line. Stood up at z = height_at(offset) that degenerate face becomes a vertical triangle: a
gable. The neighbouring walls’ corners slide along the frozen wall
rather than over it, so the ridge runs out to it instead of hipping away.
It is the same panel with the same rule applied, so it gets no special
variant. A consumer that wants to tell the two apart can: a gable’s
footprint has zero area, and nothing else’s does. The roof example
names its OBJ groups that way.
Fields
wall: EdgeIdThe wall it rises from.
This is the traceability a straight skeleton gives for free: no search, no nearest-neighbour query. The panel is the region that wall’s wavefront swept.
band: u8Which band of the Profile it belongs to, counting from the
eaves. A Profile::Hip only ever has band 0; a
Profile::Mansard has band 0 below the break and band 1 above.
Flat
The flat a truncated roof stops at, standing over the skeleton’s residual.
One of these per residual loop, wound like the input’s rings:
counter-clockwise for a flat’s outline, clockwise for a hole in one. So
a flat with a hole in it — a courtyard’s, say — is two Flat panels, and
the winding is what says which is which.
That is deliberately the raw material rather than a finished mesh. A
consumer that cannot express holes has to triangulate, and how is its
own business: the crate hands over the loops and their winding, which is
the part only it knows. The roof example shows one way, in about thirty
lines.