The VSON Cookbook

13/24 Page

Floor Plan: Simple Room

A floor plan is a series of outlines. Each outline is a closed loop of walls, traced clockwise around the room. This recipe builds the simplest possible floor plan: a single rectangular room.

Value
Template "Floorplan"
Shape.Hide Always true on floor plans.
Measurements Architectural notation strings: "12'", "6\"", "5 6\"". Never decimals.

A 12-by14 Empty Room

{
  "Version": "1.0",
  "Template": "Floorplan",
  "KeepDocument": true,
  "FloorplanSettings": {
    "scaletype": "Architectural",
    "thickness": "4\""
  },
  "Symbols": [],
  "Shape": {
    "Hide": true,
    "Outline": [
      {
        "origin": { "x": "10'", "y": "10'" },
        "thickness": "4\"",
        "segments": [
          { "endPoint": { "x": "12'", "y": "0'" } },
          { "endPoint": { "x": "12'", "y": "14'" } },
          { "endPoint": { "x": "0'",  "y": "14'" } },
          { "endPoint": { "x": "0'",  "y": "0'" } }
        ],
        "furniture": []
      }
    ]
  }
}
12 by 14 foot room example

How the Outline Works

You are tracing the walls clockwise, starting at the top-left corner of the room.

  • Origin sets the top-left corner of the room on the drawing area. +x is right, +y is down.
  • Segments trace walls in order. The first segment begins at the origin; each next segment begins where the previous one ended.
  • Endpoints are coordinates relative to the outline's origin (not absolute, and not deltas from the previous endpoint).

For the 12-by-14 room above:

Segment Wall Cursor moves endPoint
1 Top, 12' right (0, 0) → (12', 0) {"x": "12'", "y": "0'"}
2 Right, 14' down (12', 0) → (12', 14') {"x": "12'", "y": "14'"}
3 Bottom, 12' left (12', 14') → (0, 14') {"x": "0'", "y": "14'"}
4 Left, 14' up (0, 14') → (0, 0) {"x": "0'", "y": "0'"}

The final segment's endPoint must always return to {"x": "0'", "y": "0'"} to close the room.

Validation Checklist

Every outline must satisfy:

  • [ ] The final segment's endPoint is {"x": "0'", "y": "0'"}.
  • [ ] Sum of +x movement equals sum of -x movement.
  • [ ] Sum of +y movement equals sum of -y movement.
  • [ ] All measurements use architectural notation (no decimals).

Variations

  • Different size: change the endpoint values. A 20-by-15 room uses "20'" and "15'".
  • Different origin: change origin.x and origin.y to position the room elsewhere on the drawing.
  • Different wall thickness: change thickness on the outline. The default in FloorplanSettings applies if you omit it.
  • Metric: change scaletype to "Metric" and use meter and millimeter values.
13/24 Page