Import
Example
Notes
- Profile points are
[x, z]in metres.pitchandridgeDirectionare in degrees.elevationis the wall-plate height where the roof crosses its outline; a pitched eave isoverhang × tan(pitch)lower. - A flat roof can have holes. A pitched roof cannot.
- Gable and hip roofs build on any simple footprint of up to 200 corners, convex or not, at any angles. Their planes come from the straight skeleton of the eave outline and meet in valleys at the inner corners. A gable roof on a non-convex footprint has its gable ends at the wing ends and does not use
ridgeDirection. A saved gable roof with no clear wing end builds as a hip roof with agable-built-as-hipwarning. - A saved roof with
eaveCut: 'square'ends at right angles to its slope. Draw its outline on the outer face of the walls:eave-cut-past-wallmeasures from the outline and does not read the walls. A shed roof is cut along its low edge and the edges in line with it. overhangmoves the roof edge outward.thicknessis measured at a right angle to the roof plane.massStylefills the volume below the roof planes.- The
pitchsetter keeps the value between 5 and 75 degrees. - Start the geometry kernel before you create this object. See
Floorkit. - This object is live geometry. To save a building, write it in a building model.
extends OPElement implements IShape, IPlaceable, PlanVectorExportable
Constructor
Wall-line footprint in the world XZ plane (the eave ring is this ring offset outward by
overhang). Holes are honored by FLAT only; pitched types throw on holes.World Y of the wall plate: the underside of the roof where it crosses the footprint. A pitched
roof’s eave underside is
overhang × tan(pitch) lower; a FLAT roof’s underside is here
everywhere.Plan direction of the ridge in degrees, counter-clockwise seen from above from +X (GABLE: edges
within 45° of this direction slope; SHED: the high side is on this direction’s right, seen from
above: +Z for 0, +X for 90). Defaults to the direction of the footprint’s longest edge. A GABLE on
a non-convex outline ignores it: its gable ends are the wing ends.
When true, build the filled “attic mass” under the roof planes instead of a constant-thickness
plate — half the boolean work, and exactly what massing shells need.
The chimney stacks of its building, from
BmStorey.chimneys: each one that passes through the
roof cuts it.The colours of the trim parts with a saved material. Absent: the plain ones.
World Y of the ground under a plan point, where a downpipe stands. Absent: 0.
Properties
Read-only. True when a GABLE on a non-convex outline has no clear wing end to put a gable on
(none, or two gables on one corner), so its edges without an entry in
edges are built as a HIP.Show the plan view: the eave polygon and the ridge or slope lines. They sit inside the roof solid,
so they show only while
modelView is off.Methods
editableSchema
move
delta (world-space, meters).
rotate
angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).
setOPGeometry
undersideAt
[x, z], or undefined outside the eave ring.
getExportRoots
toDrawing
planSlopes
[x, z], and the part of it the roofs it joins leave seen.
setOPMaterial
getOPConfig
setOPConfig
beginEdit
beginEdit before endEdit keeps the first start.
endEdit
getEditAnchors
v:hole:<hole>:<corner>; move on the XZ plane), and a wall-plate elevation grip at the footprint centroid (raise/lower along +Y).
applyEditAnchor
dispose
Types
RoofOptions
RoofProfile
Polygon profile for a Roof — alias of PolygonProfile.RoofType
RoofMaterial
ChimneyStack
The stack of a saved chimney in world units, as the roofs it passes through cut and draw it.The cap: the plan outline of its outermost course and the world heights of its foot and top,
metres; absent with no cap.