Skip to content

five-on-it / packages/catalogue/src/city/checks

packages/catalogue/src/city/checks ​

What a city spec's network must not do, found before Blender builds anything: the four checks of network.py (a road shorter than it is wide, a bend tighter than its width allows, two junctions too near for their rounded corners, roads meeting too sharply to round) and what Blender let through silently: a road leaving the map, an end that stops short of a road without joining it, two roads running so near that no pavement fits between their kerbs, a river crossed at a shallow angle, an end in the water, roads meeting over the water, a street of the town climbing a hill (unless it tunnels under it), a climb too steep. Each is said at the spec's path of the road it is about, with where on the map, its code and, in the game's frame, its at and what a fix needs (data, the road's own name in road each time): bend-tight its radius and the radius its road needs; road-short its length; road-off-map the map's half; junctions-near the other junction, their gap and the least gap; arms-sharp the other road, their angle, their directions out of the junction (direction, otherDirection) and whether each ends there (roadEnds, otherEnds); end-gap the road to end onto, which end (from or to) and the gap; pavement-near the other road; hill-street the hill; climb-steep the climb and the road's length.

Functions ​