add_roof
Creates a complete gable, hip, or dormer roof from a ridge line and returns its element ID; optional sunlight shading makes exterior roofs read as solid volumes.
Instructions
Add a roof from its RIDGE LINE. Returns the new element id.
sunlight: shade the roof's faces from a sun direction. This is what makes a
roof read as a solid volume rather than a flat patch of tiles, and it is
worth setting on any exterior building.
sun_angle: degrees the light comes FROM. Use ONE angle for every roof on a
map — two buildings lit from different directions read as a mistake
immediately.
sun_contrast: 0 is flat, higher is starker.
IMPORTANT: `points` is the roof's ridge (the peak line), NOT a footprint to
trace. DD builds a complete, self-closing roof that slopes down `width`
woxels perpendicular to each side of the ridge, with hips/gables off the
ridge ends. The footprint covered = the ridge's bounding box expanded by
`width` on every side.
To roof a building W x H: put the ridge along the LONG axis, centered, and
set width = half the SHORT dimension so the eaves reach the side walls. The
ridge should be shorter than the long wall by ~width at each end (so the end
hips land on the short walls). Two points that are close together give a
near-pyramid (a square hip roof).
asset: a Roofs asset path (list_assets('Roofs')). type: 0=gable, 1=hip,
2=dormer. Roofs render above everything (z 800). Undoable as a create.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"points": "<points>",
"asset": "<asset>"
},
"name": "add_roof"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| asset | Yes | ||
| width | No | ||
| points | Yes | ||
| sorting | No | ||
| sunlight | No | ||
| sun_angle | No | ||
| sun_contrast | No |