Skip to main content
An ESX export’s input is a roof in OSA’s roof format, version 1 (osa-roof/1). It describes one or more roofs as seen from above, with enough to build each one in three dimensions: where the corners are, what each edge is, how steep each face is, and, where known, how high the eaves are. You are responsible for the roof being right. OSA checks only that it holds together: a roof that cannot be built is refused, and any other problem is a warning. See Roof checks and problems. Lengths and areas are not sent: OSA works them out from the points and the faces’ pitches.

A complete example

A simple gable, 40 by 30 ft, pitch 6/12, with its eaves 9 ft above the ground, drawn in feet:
The four corners a to d are the eaves’ ends, and e and f are the ridge’s. Two eaves, a ridge and four rakes bound two faces, each sloping down toward its eave. ESX exports shows the whole request this goes into. type, format, plan and structures are required. type is always roof and format always osa-roof/1.

What you draw

  • The roof as seen from above. Each point is a corner of the roof, and x and y are its position on the drawing. plan says which way y grows and which way the top of the drawing faces.
  • Eave heights from the ground. eave_height_ft is the height above the ground of the face’s eave edges.
  • Pitches up to 24/12. A face’s pitch is at most 24.
  • What the format does not cover: roof material, chimneys, photos, line items, holes in faces, and where the measurements came from.

Ids

Every point, edge, face and structure has an id of 1 to 64 letters, digits, -, _ or ., unique within its list. Use your own: problems name them, so you can find what each one is about.

The plan

plan says how to read every x and y. Heights are always in feet, whatever the plan’s units. Fields that carry a height end in _ft. The origin can be anywhere: OSA moves it to the middle of each structure.

Structures

structures lists the separate buildings, such as a house and a detached garage, at most 10. Each is a roof that touches no other structure’s roof. Most roofs have one.

Points

Each corner of the roof as seen from above. A point is one place in three dimensions. Where two parts of a roof pass over the same spot at different heights, such as a lower roof meeting the wall below a higher eave, that spot needs two points: one for each roof. The example with two levels below does this.

Edges

Each line between two points that bounds a face.

Faces

Each flat surface of the roof.

Which way a face slopes

A face slopes down toward its eave edges, at right angles to them. All of a face’s eaves should be parallel and on the same side of it. A face with eaves on opposite sides is built sloping toward its longest group of eaves, with a warning. An eave edge can also be where a lower roof ties in: the same edge is the low edge of the upper face and the top edge of the lower one. So a face’s eaves are its eave edges that lie on no other face. Only if a face has no such edge are its eave edges shared with another face used as its eaves. A sloped face with no eave, such as the upper face of a gambrel above its pitch_break, names the edge it slopes down toward in low_edge. Without it, the face is built from the faces around it, with a major warning. A flat face (pitch 0) needs neither.

Flat means flat

Every point of a face should lie on one plane: the plane its pitch, slope direction and height give it. Where faces share a point, they should agree on its height to within 1 inch. Beyond that, the point is built at their average, with a warning. With z_ft on every point, nothing is averaged: see Heights.

Heights

Give heights one way per structure. A structure that uses both z_ft and eave_height_ft is refused (check 1).
  1. No heights at all. The roof is built with its lowest eave at 0 ft. The ESX has a correctly shaped roof but no height above the ground.
  2. eave_height_ft on faces (recommended). Faces that share a ridge, hip or valley take their heights from each other, so one face per section of roof is enough. A roof with several eave levels, such as a second storey over a garage, gives each level its own eave height.
  3. z_ft on every point, if you measure in three dimensions. Each point is built at the height you gave it, and nothing is averaged. OSA checks that every face is flat and that its pitch matches its points; where one does not, a check 5 warning says so: minor up to 1 ft, major beyond.
A section is a group of faces that share points. A lower roof that meets the wall of a higher one has its own points there, so it is a section of its own: it cannot take its height from the roof above. In a structure that gives heights, a section left without one is built with its lowest eave at 0 ft, with a major warning. A structure with z_ft on some points but not all is refused (check 1). See Roof checks and problems.

A roof with two levels

A two-storey gable with a lower roof on its south side. The lower roof meets the wall under the upper south eave, so the points where they meet are drawn twice: up-sw and up-se for the upper eave, wall-w and wall-e for the top of the lower roof, at the same x and y. Each level gives its own eave height.

Features

features counts things on a structure’s roof that the estimate needs and the drawing does not show. Each is a whole number from 1 to 100,000; leave out what is not there. They apply to the structure’s whole roof, not to one face.

A house and a garage

Two structures: a hip-roofed house with features and an overhang on every eave, and a detached gable garage. Only the house’s south face carries an eave height; the other three faces take theirs from it through the hips and the ridge.
Ids are unique within their own list, so the house and the garage can both have a point sw.