File format

A plan is a JSON file. What is in it.

A .clearline file is JSON text. You can read it, diff it, keep it in version control and write tools for it. The format is the one the earlier web version stored in plan.json.

All lengths are millimetres. x points right, y points up.

Top level

Key Contents
version Format version, currently 1
name The plan’s name
units Display units: mm, cm or m
grid Snap grid in mm
defaults Thickness, height and drywall build-up for new walls
nodes Corners: id, x, y
walls Walls between two corners
openings Doors and windows on walls
fixtures Objects: furniture, sanitary, kitchen, electrical devices, radiators
runs Cables and pipes as lists of points
zones Floor heating zones as polygons
taps Water tap points
sketches Freehand strokes
guides Helper lines
layers Visibility and lock per layer

A wall

{
  "id": "w-k3f9qa",
  "a": "c-1", "b": "c-2",
  "kind": "drywall",
  "anchor": "interior",
  "inside": 1,
  "thickness": 125,
  "height": 2500,
  "build": {
    "profile": 75,
    "layersInside": 2, "layersOutside": 2,
    "boardInside": "standard", "boardOutside": "moisture",
    "insulation": true
  }
}
  • a and b are corner ids. The line between them is the sketch.
  • anchor says which face the sketch is: interior, center or exterior.
  • inside says which side the room is on: 1 to the left of a→b, -1 to the right.
  • build is present for drywall with a build-up; thickness then follows from it.

An opening

{ "id": "door-1", "wallId": "w-k3f9qa", "kind": "door",
  "offset": 600, "width": 860, "height": 2100, "sill": 0,
  "hinge": "start", "swing": "in" }

offset is the distance from corner a to the near jamb. A pocket sliding door has a slide object with the leaf and the pocket side.

An object

{ "id": "sofa-3-x1", "kind": "sofa-3",
  "x": 1500, "y": 900, "rotation": 1.5708,
  "w": 2200, "d": 950, "h": 800, "elevation": 0 }

rotation is in radians; 0 faces +x. An object on a wall also has wallId and offset (its centre along the wall from corner a). Outlets and switches have electrical with the list of inserts and the orientation.

A sketch stroke

{ "id": "ink-7", "color": "#e53935", "width": 30,
  "points": [0, 0, 1,  500, 0, 0.4,  1000, 400, 1] }

points is a flat list of x, y and pressure (0 to 1) per point. width is in mm on the plan. The colour ink means the plan’s own ink colour.

Reading files

The app repairs what it can when it opens a file: missing optional fields get defaults, an opening on a missing wall is dropped, an object on a missing wall becomes free-standing. Object kinds the app does not know are left out.

To change plans from scripts, prefer the command line tool: its commands keep the plan consistent.