Projects / Computational geometry
KrovLab
KrovLab takes a building footprint and a roof pitch and returns the geometry of a hipped roof: faces, hips, ridges, valleys and the quantities a roofer needs. When a plan cannot be roofed it returns a named failure rather than a wrong answer.
The server sleeps when idle, so the first load can take a few seconds.
About the project
KrovLab works out a roof from the outline of a building. You give the walls as a footprint in metres and say how steep each side is, and it returns the faces, hips, ridges and valleys of the roof together with its quantities: surface area and the lengths of eaves, hips, ridges and valleys.
The core is a weighted straight skeleton written in Python. Bad input does not raise an exception; it comes back as a named failure, such as a footprint that crosses itself or two cells that overlap, with a reason that can be shown to the user. Each roof is checked as it is built, and the result says whether it is a valid terrain. The roofs it generates are a strict subset of the roofs you can build, and the repository documents what it cannot represent.
The web demo wraps the library. It opens on a catalogue of examples (gable, shed, knee, gambrel, courtyard, two-cell projects, a dormer and a named failure), draws the roof plan and a 3D view, accepts a DXF footprint and lets you download the roof as OBJ and GLB meshes. It is a demo of a Python library, not a finished product.
Screenshots

