bimtex
The format

Roofs

Write the pitch. The ridge is arithmetic, and arithmetic is where drawings disagree.

You never write a ridge height.

{"t":"roof","id":"roof","type":"gable","ridgeAxis":"x","pitch":0.45,"overhang":0.4}

That is the whole roof. The ridge is

eave + (half span + overhang) × pitch

computed once and read by the elevation, the section, the roof plan and the 3D alike. A ridge that is 6.2 m on the section and 6.0 m on the elevation is one of the classic drawing-set contradictions, and it is unavailable here — not because the tool is careful, but because there is nowhere to type the second number.

Built-ins and data-authored forms

type is flat, gable, hip or shed. Each produces real surfaces that the drawings and the 3D both consume.

Anything outside those four needs one formdef whose selector is roof:<type>. Without it the result is roof/type, a blocking error — never a fallback to gable or flat.

ridgeAxis says which way the ridge runs, x or y. overhang is the eaves projection, and it is included in the ridge arithmetic above, so a deeper eave raises the ridge exactly as it does on site.

Two overlapping built-in pitched roofs on the same building derive their valley, ridge or mixed hip seam from the face-plane intersection. The roof plan draws that seam solid and the floor plan below draws it dashed overhead. This path is deliberately limited to gable, hip and shed; a formdef remains one independent analytic surface.

A formdef carries 3–64 normalised [u,v] profile points and either op:"revolve" or op:"extrude". The roof supplies rise; pitch is not read. The same profile supplies the plan outline, section curve, elevation silhouette and 3D surface. Profiles are polylines—sample curves explicitly, with no arc or smoothing fields.

{"t":"formdef","id":"dome-form","for":"roof:dome","op":"revolve","profile":[[1,0],[0.94,0.342],[0.766,0.643],[0.5,0.866],[0.174,0.985],[0,1]]}
{"t":"roof","id":"dome","type":"dome","rise":9,"overhang":0}

Composing a shape that is not one rectangle

An L-shaped or T-shaped roof is several roof rectangles, not one clever roof entity. Where their pitched faces overlap, the seam is derived rather than authored — classified valley, ridge or hip by which way the planes drain, drawn solid on the roof plan and dashed overhead on the floor plan. Nobody has ever drawn a valley in bimtex, and nobody ever will.

If you are looking for a roof type that describes your building's whole outline, you almost certainly want to split the footprint instead.

What bites

A flat roof still needs to be declared. There is no implicit roof; a building with no roof entity has none, and the elevation will show you.

overhang changes the ridge. Increase it to fix an eaves detail and the ridge goes up with it. That is correct, and it surprises people once.

See it

Change pitch to 0.2, or type to hip, and watch all four tabs move together. The ridge figure on the section was never typed.

Compiling drawing set…

When no roof can be derived at all, the component omits its Roof tab rather than showing an empty promise.

Where to go next