Skip to content

five-on-it / apps/tools/src/roof-spots

apps/tools/src/roof-spots ​

Where things may stand on a building's roof, for the kit library (kit-library.ts): a top-down camera reads a city by its roofs, and a generator dresses them (air-conditioning units, water tanks, terraces: the urban kit) only where a roof is flat and free.

The roof of a mesh is its highest large flat face turned up (the largest such level, or a higher one at least half as large: a tower's top over its podium, a mall's roof over its floors). It is sampled on a grid of ROOF.cell metres; a cell is free when its middle is on the roof and nothing of the mesh stands over it (a parapet, a sign, a skylight, a penthouse: any triangle that rises above the roof, by the box of its footprint). The spots are the freest places, each with the radius clear round it, taken greedily and kept apart by their radii, so what stands on one never reaches another. Pure and deterministic: the same mesh gives the same spots.

Interfaces ​

Variables ​

Functions ​