Documentation menu
Developers

Plan JSON format

The structured plan format the importer, AI and DreamCode all produce.

Plan JSON is DreamHome’s structured plan format. The importer reads it, the AI and DreamCode produce it, and saved plans are stored as it. Import one with File → Import Plan (which also offers bundled samples) and export the current design with File → Export Plan.

plan.json
{
"unit": "m",
"scale": 1,
"walls": [
{ "id": "w1", "start": [0, 0], "end": [5, 0], "thickness": 0.2, "height": 2.7 },
{ "id": "w2", "start": [5, 0], "end": [5, 4], "thickness": 0.2, "height": 2.7 },
{ "id": "u1", "start": [0, 0], "end": [5, 0], "height": 2.7, "baseHeight": 2.85 }
],
"openings": [
{ "wallId": "w1", "kind": "door", "offset": 2, "width": 0.9, "height": 2.1 },
{ "wallId": "w2", "kind": "window", "offset": 1.5, "width": 1.2, "height": 1.2, "sillHeight": 0.9 }
],
"placements": [
{ "id": "c1", "type": "Ceiling", "position": [0, 0], "rotation": 0, "baseHeight": 2.67,
"params": { "width": 5, "depth": 4, "thickness": 0.02 } },
{ "type": "Sofa", "position": [2.5, 3], "rotation": 0 }
],
"electrical": [
{ "id": "ms", "type": "MainSwitch", "surface": "wall", "hostId": "w1", "su": 0.5, "sv": 1.6 },
{ "id": "s1", "type": "Switch", "surface": "wall", "hostId": "w1", "su": 1.6, "sv": 1.2,
"mainSwitch": "ms", "controls": ["l1"] },
{ "id": "l1", "type": "Bulb", "surface": "ceiling", "hostId": "c1", "su": 2.5, "sv": 2, "wattage": 12 }
],
"roof": { "preset": "gable", "pitch": 22, "overhang": 0.6 }
}

Fields#

FieldNotes
unitm (default), cm, mm, ft or in. scale is an extra multiplier.
walls[]start/end are [x, z] in plan view. Optional thickness, height, baseHeight (upper storeys), curved + arcAngle + segments, color, and a per-wall roof override.
openings[]kind door, window or gate on wallId; offset is from the wall start to the opening’s near edge.
placements[]Any component type at [x, z] with a rotation (degrees) and params. Without baseHeight it rests on the ground.
electrical[]Fixtures on a wall (hostId = wall id) or ceiling (hostId = a Ceiling placement id); su/sv are the position on that surface. Switches list controls and their mainSwitch.
roofPlan-wide roof options: preset, pitch, overhang, colour…
Note
Coordinates may also be written as { "x": 0, "z": 4 } objects or flat x1/z1/x2/z2 fields, and numeric strings are accepted. A malformed entry is reported and skipped; the rest of the plan still imports.