Import
Example
Notes
- Profile points are
[x, z]in metres.pitchandridgeDirectionare in degrees.elevationis the height of the eave. - A flat roof can have holes. A pitched roof cannot.
- A hip roof needs a convex footprint.
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
string
string
ElementType.ROOF
PolygonProfile
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.RoofType
number
Slope in degrees from horizontal (GABLE/HIP/SHED). Clamped to 5–75.
number
Horizontal eave overhang beyond the footprint (m).
number
Plate thickness measured perpendicular to the roof plane (m).
number
World Y of the eave (wall plate top).
number
Plan direction of the ridge in degrees (GABLE: edges within 45° of this direction slope; SHED: the
high side faces this direction’s left). Defaults to the direction of the footprint’s longest edge.
boolean
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.
number
RoofMaterial
PropertySets
Properties
ElementType
string
Map<string, OPGeometry>
Map<string, OPGeometry>
boolean
boolean
boolean
RoofOptions
string
RoofProfile
RoofType
number
number
number
number
number | undefined
boolean
number
RoofMaterial
boolean
boolean
boolean
Methods
editableSchema
move
delta (world-space, meters).
rotate
angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).
setOPGeometry
getExportRoots
toDrawing
setOPMaterial
getOPConfig
setOPConfig
beginEdit
beginEdit before endEdit keeps the first start.