Schematex

Floor plan

About floor plans

A floor plan is the standard 2D architectural view of a space: rooms with real dimensions, walls drawn as solid poché bands, doors with quarter-circle swing arcs, windows as glazing lines, and furniture as plan-view symbols. Wall poché, door-swing arcs, and glazing lines follow Architectural Graphic Standards conventions; Neufert, Architects' Data (Bauentwurfslehre) is the corresponding European planning reference, while ISO 128 and ISO 129 govern linework and dimensioning. Schematex renders this shared visual language from text: you declare rooms, measured opening chains, wall thicknesses, and furniture; the engine merges shared walls, computes room areas, draws dimension lines, auto-seats tables, places readable labels, and validates real door-swing clearance.

Unlike image generators, the output is measurable and editable — every room is a labeled element with its computed area, and adding a fourth row of desks is a one-line edit.

For a new layout that begins as room requirements and dimensions, FloorPlan Maker can generate a measurable first draft with this engine.

schematex§ source-defined
Studio Apartment 3 rooms, 28.8 m² total. 6 furniture items. Living / Sleeping 20.8 m² Bath 4.4 m² Kitchenette 3.6 m² 7.2 m 4 m 5.2 m 2 m Studio Apartment
14 lines · 588 chars
✓ parsed·0.0 ms·0 B
100%

1. Your first floor plan

A header, one room, a door, and a window:

floorplan "Studio"
room main "Studio" at 0,0 size 4x3
door main south at 20%
window main north at 50%

Three rules cover most usage:

  1. Start with floorplan, an optional quoted title, and unit m (default) or unit ft. All numbers are in this unit.
  2. Rooms are rectangles: room id "Label" at x,y size WxH. The label and computed area render centered in the room.
  3. Openings hang on walls: a wall reference (main south) positions along that wall at a percentage; between A B finds the shared wall automatically.

2. Rooms and placement

Place the first room at 0,0 and chain the rest relatively — adjacent rooms share an edge exactly, and their walls merge into a single band:

room living  "Living Room" at 0,0 size 5.2x4.2
room kitchen "Kitchen"     right-of living size 3.0x4.2
room hall    "Hallway"     below living size 2.0x2.6
room bed1    "Bedroom 1"   right-of hall size 3.2x2.6
  • right-of / left-of / above / below snap to the reference room's edge.
  • align start|center|end aligns the cross axis (default start = top/left edges flush); offset n shifts it.
  • fill #e0f2fe tints the floor; nolabel suppresses the name + area label (single-space plans like classrooms).
  • Coordinates are y-down: at 0,0 is the top-left corner.

L/T/U-shaped rooms use extend — declare the main rectangle, then grow it with edge-sharing rectangles. The walls merge along the seam, the area is summed into one number (exactly how professionals measure L-rooms), and the label centers on the largest part:

room living "Living Room" at 0,0 size 5x4
extend living at 5,2 size 2x2          # L-shape: notch at top-right

An extension that doesn't touch the room, or overlaps it, is rejected with a quantified error. north (optionally north 30 for rotated plans) adds the compass at the top right.

For an addition or conversion where the existing home defines the starting geometry, FloorPlanCreator.org provides a workflow centered on that remodeling context.


3. Doors, windows, openings

door hall west at 50% width 1.0 swing in          # exterior door on a wall
door between hall bed1 at 50% hinge right          # interior door on the shared wall
door between bed1 bath at 30% type sliding         # sliding door — no arc
opening between living kitchen at 35% width 1.2    # archway, no leaf
window living north at 30% width 1.8
  • between A B resolves the shared wall segment and positions at the percentage along the overlap — no coordinates needed. Non-adjacent rooms are rejected with the measured gap.
  • Doors default to 0.9 m wide on exterior walls, 0.8 m on between walls; windows default to 1.2 m.
  • hinge left|right picks the jamb; swing in|out flips the quarter-arc (default swings into the owning room — the first room named).
  • Door type single|double|sliding|pocket|bifold: double draws two mirrored arcs; sliding/pocket draw offset leaf lines without an arc; bifold draws the two closet-door tent peaks.
  • Window type fixed|sliding|casement|bay: sliding = two offset panels, casement adds the outward swing arc, bay projects a splayed trapezoid outside the wall.
  • Openings clamp to fit their wall segment (with a warning) rather than overflowing.

For a measured façade, identify the first opening and place the rest relative to it:

door hall south from start 0.30 width 0.90 id entry
window hall south after entry gap 0.10 width 1.20 id display1
window hall south after display1 gap 0.20 width 1.20 id display2

start means west on a horizontal wall and north on a vertical wall. from start n measures to the leading jamb; from end n measures from the opposite end to the trailing jamb. A before / after reference must name an earlier opening on the same resolved wall, so source order stays readable and deterministic.

Wall thickness hierarchy

Use broad defaults first, then override only the shared wall that differs:

wall exterior thickness 0.35
wall interior thickness 0.12
wall between kitchen dining thickness 0.20

The same resolved wall segments drive poché, opening gaps, and semantic SVG. Openings therefore inherit their host wall's real thickness. With no wall statements, every wall keeps the existing 0.20 m default.


4. Furniture

Furniture is placed relative to its room's interior top-left corner, with optional size, rotate, and a label:

furniture sofa in living at 0.25,2.9
furniture desk "Teacher" in class at 2,1.5 size 5x2.5 rotate 20
furniture counter "Cubbies" in class at 6,24.4 size 10x1.2

When the requirement is “make this symbol fit the room,” use fit instead of estimating a rotated bounding box by hand:

furniture stairs-l S1 in stairwell fit margin 0.10 size 2.4x3.2 rotate 90 mirror x

fit applies rotation, scales down only when necessary, preserves aspect ratio, and centers the final envelope in the largest room part. mirror x|y reflects geometry around the symbol center; human-readable text remains upright.

The catalog spans residential, commercial, and site work (sizes default to industry-standard footprints):

ClusterTypes
Residentialbed-double bed-single bed-queen bed-king bunk-bed crib sofa loveseat sectional armchair ottoman coffee-table side-table tv tv-stand fireplace floor-lamp rug wardrobe dresser nightstand bookshelf plant piano piano-upright pool-table ceiling-fan dining-table
Kitchen / bathcounter wall-cabinet kitchen-sink stove range-hood fridge dishwasher island bar-stool toilet sink vanity bidet urinal bathtub shower washer dryer
Classroom / officedesk-chair desk desk-l chair whiteboard smartboard bookcase cubbies filing-cabinet lockers kidney-table round-table-4/6/8/10 conference-table
Event / banquetbanquet-table head-table stage dance-floor bar dj-booth cocktail-table podium row-chairs
Retail / warehouseshelving checkout clothing-rack fitting-room pallet-rack loading-dock forklift
Salon / gymsalon-chair shampoo-bowl manicure-table treadmill weight-bench power-rack yoga-mat
Restaurant / commercial kitchenbooth prep-table range walk-in commercial-sink fryer
Stairs / structuralstairs stairs-l stairs-u spiral-stairs elevator column
Site / outdoortree car

Auto-seating is built in: round-table-8 draws 8 chairs on its circumference (60″ top; round-table-10 uses 72″), dining-table / banquet-table / conference-table seat both long edges at one chair per 0.65 m, head-table seats one side facing the room, manicure-table seats a client and technician chair, and row-chairs places a theater strip at 0.55 m pitch. rug, dance-floor, yoga-mat, counter, island, wall-cabinet, range-hood, and ceiling-fan are underlays/overheads — other furniture can overlap them without a collision warning.

Seating charts — name the occupants of any auto-seating table with a seats clause, and the engine writes each name onto its chair (in placement order: round tables clockwise from the top; rectangular tables fill the top edge left-to-right, then the bottom edge). This turns a venue floor plan into the seating chart guests actually read:

furniture round-table-8 "Table 3" in hall at 11,4 seats "Alice" "Bob" "Carol" "Dave"
furniture head-table "Head Table" in hall at 5,0.6 size 6x0.9 seats "Bride" "Groom"

Extra chairs without a name stay empty; extra names past the chair count are ignored. CJK-quoted names (seats "张伟" "李娜") work like every other label. Names read horizontally, so keep the table unrotated for a clean chart.

tree and car are sized for the outdoors (canopy disc, parking-stall footprint), so a site plan is just zones tiled as adjacent rooms — front yard, house footprint, driveway, back yard — with trees and parked cars placed on top.

Stairs follow the drafting conventions: tread lines at 0.28 m (11″), a direction arrow starting at the lowest tread labeled UP (give the item a "DN" label for a descending run), and the 45° zigzag break line at the imaginary 4-ft cut plane, with dashed treads beyond. stairs is a straight run (orient with size/rotate), stairs-l turns 90° over a landing, stairs-u switches back 180°, spiral-stairs is a circle with radial treads and a center pole.

Room labels require no placement syntax. The layout scores stable center-out candidates against visible furniture envelopes (including chairs generated by tables), MEP symbols, hinged-door swing sectors, and protected-zone captions. Constrained service rooms render a compact name-only label instead of forcing an unreadable area line.


5. Electrical plans

Set the document-wide electrical convention on the header. symbols nec is the default and uses ANSI Y32.9 / NEC-style receptacle and S-family switch marks common on US plans. symbols iec uses IEC 60617 socket semicircles and dot-and-lever switches for European installation drawings, including NEN 1010 workflows.

floorplan "Electrical Plan" unit m symbols nec

The complete electrical vocabulary is grouped by purpose:

FamilyTypes
Receptaclesoutlet duplex-outlet gfci-outlet outlet-240v floor-outlet weatherproof-outlet
Switches and controlsswitch switch-3way switch-4way switch-dimmer motion-sensor thermostat
Luminaireslight ceiling-light recessed-light wall-light pendant-light fluorescent-light emergency-light
Safety, communications, and distributionsmoke-detector data-outlet tv-outlet phone-outlet junction-box electrical-panel distribution-board

Use fixture for wall-mounted items. It attaches the symbol to a named wall and turns directional receptacle, switch, and wall-light glyphs to face the room; the placement survives room resizing. Use furniture for items positioned within the room, where at x,y is the symbol's top-left corner, not its center.

fixture gfci-outlet G1 in kitchen on north at 30%
fixture switch-3way SW1 in hall on west at 20%
furniture recessed-light L1 in hall at 1.4,0.5

Give switches and luminaires instance ids, then connect them with controls. One switch may control several luminaires, and several switches may control the same luminaire. The renderer draws themeable dashed curves for these functional relationships. They show which switch operates which luminaire, not conductor runs, circuit membership, or cable routes back to a panel.

schematex§ source-defined
Hallway Lighting 2 rooms, 25.0 m² total. 6 furniture items. RCD Hallway Living Room 17.5 m² 5 m 5 m 1.5 m 3.5 m Hallway Lighting
11 lines · 462 chars
✓ parsed·0.0 ms·0 B
100%

6. Fire safety and evacuation plans

Use the evacuation header (alias escapeplan) when the floor needs to become a posted life-safety plan. It keeps the same rooms, walls, openings, stairs, and real coordinates, then adds pictogram-first ISO-style signs, cross-room routes with forward chevrons, and a mandatory legend derived only from items used.

schematex§ source-defined
Office Escape Plan 4 rooms, 2 escape routes, ISO 23601 profile. Scale 1:50 on A3 (landscape) · symbols 8.0 mm · ISO 23601 ✓ Open Office Corridor West Exit East Exit N Scale 1:50 on A3 (landscape) · symbols 8.0 mm · ISO 23601 ✓ Office Escape Plan ESCAPE ROUTES Primary escape route Alternative escape route EXITS Final exit (E001) Assembly point (E007) FIRE EQUIPMENT Fire extinguisher (F001) Fire alarm call point (F005) FIRST AID First aid (E003) STRUCTURAL You are here (ISO 23601)
21 lines · 820 chars
✓ parsed·0.0 ms·0 B
100%

Route syntax is exact and intentionally authored:

route [primary|secondary|accessible|rescue] anchor -> anchor [-> anchor ...] ["label"]

Name each room crossed. Every room-to-room hop must use a declared door or opening; the engine routes through its center and never invents a passage. Chevrons follow the ordered anchors, secondary is dashed, accessible adds an accessible-egress mark, and rescue is blue.

Sign syntax works with or without the safety prefix:

[safety] kind [id] in room at x,y [side north|south|east|west] [hand left|right] ["label"]
[safety] kind [id] outside at x,y [hand left|right] ["label"]

Core kinds are here, exit, exit-direction, exit-final, assembly, first-aid, aed, extinguisher, call-point, and hose-reel. Common aliases include emergency-exit/fire-exit, exit-arrow, assembly-point/muster-point, fire-extinguisher, fire-alarm, fire-hose-reel, defibrillator, and you-are-here. Safe-condition signs stay safety green and firefighting equipment stays safety red; labels are optional, so the plan remains legible across languages.

legend: auto is the canonical form. Evacuation legends cannot be disabled and list only route styles, signs, and rated-door marks present in the drawing. See the full Evacuation plan reference for ISO/NFPA/UAE profiles, print scale, all signs, and validation rules.


7. Arrays — grid, row, arc

Repeated furniture is one statement, not thirty:

grid desk-chair in class rows 5 cols 6 count 27 area 5,8 25,24 itemsize 2x2.5
row round-table-8 in hall cols 3 area 8.8,13.4 15.2,13.4 itemsize 2.3x2.3
arc chair in hall count 13 center 12,8 radius 5 from 200 to 340
  • area x1,y1 x2,y2 gives the first and last item centers; items spread evenly between them.
  • count truncates row-major — 27 desks in a 5×6 grid drops the last row's tail, exactly like a real classroom.
  • arc places items on a circular arc facing the center — semicircle classrooms, ceremony seating.

8. Units, areas, dimension lines

  • unit ft makes every number feet; dimension lines format as 32' / 15'1" and areas as sq ft. Internally everything is metric (1 ft = 0.3048 m).
  • Room areas are computed by the engine from the declared geometry, never typed by hand.
  • Dimension lines render outside the plan with architectural slash ticks: overall width + height always, plus per-room segments along the top and left exteriors.

9. Validation

The engine validates what LLMs (and humans) actually get wrong, with errors that name the offending elements and a fix direction:

Errors block rendering because the document cannot be resolved honestly. Examples include an undeclared room id, extending something that is not a room, a duplicate opening id, or a relative opening that references a future/cross-wall id.

Warnings (render anyway, listed under the plan):

  • Room overlap — rooms "bed1" and "bath" overlap by 0.40×2.60 m — move "bath" right-of "bed1" or shrink size.
  • Door between non-adjacent rooms — the invalid door is skipped and the measured room gap is reported; the rest of the building still renders.
  • Furniture outside its room — geometry is preserved exactly as authored and the warning reports the overshoot: furniture sofa #1 extends 1.7 m outside room "c" — move it or shrink size.
  • Furniture collision — bounding boxes including chair-ring envelopes, so two banquet rounds whose chairs touch get flagged even when the table tops don't.
  • Door-swing obstruction — furniture intersecting a single/double hinged door's swept quarter-circle reports floorplan/door-swing-obstructed; sliding, pocket, and bifold doors claim no swing sector.
  • Opening clamped to fit its wall segment.

10. Grammar (EBNF)

plan      ::= "floorplan" string? header-setting* NL statement*
header-setting ::= "unit" ("m"|"ft") | "symbols" ("nec"|"iec")
statement ::= room | extend | wall | north | door | window | opening | furniture | fixture | zone | array | controls
room      ::= "room" id string? placement "size" dims ("fill" color)?
              ("nolabel" | "label-role" ("normal"|"primary"|"secondary"|"hidden"))?
extend    ::= "extend" id placement "size" dims
north     ::= "north" num?
wall      ::= "wall" ("exterior" | "interior" | "between" id id) "thickness" num
placement ::= "at" coord
            | ("right-of"|"left-of"|"above"|"below") id ("offset" num)?
              ("align" ("start"|"center"|"end"))?
opening-placement ::= "at" pct | "from" ("start"|"end") num
                    | ("before"|"after") id "gap" num
door      ::= "door" (wallref | "between" id id) opening-placement
              ("width" num)? ("hinge" ("left"|"right"))? ("swing" ("in"|"out"))?
              ("type" ("single"|"double"|"sliding"|"pocket"|"bifold"))? ("id" id)?
window    ::= "window" wallref opening-placement ("width" num)?
              ("type" ("fixed"|"sliding"|"casement"|"bay"))? ("id" id)?
opening   ::= "opening" (wallref | "between" id id) opening-placement ("width" num)? ("id" id)?
furniture ::= "furniture" type id? ("in" id) ("at" coord | "fit" ("margin" num)?)
              ("size" dims)? ("rotate" num)? ("mirror" ("x"|"y"))? string? ("seats" string+)?
fixture   ::= "fixture" type id? "in" id "on" ("north"|"south"|"east"|"west") "at" pct
              ("size" dims)? ("rotate" num)? string?
controls  ::= "controls" id "->" id ("," id)*
zone      ::= "zone" id string? "in" id "at" coord "size" dims ("keep-clear")?
array     ::= ("grid"|"row"|"arc") type "in" id
              ("rows" int)? ("cols" int)? ("count" int)?
              ("area" coord coord)? ("itemsize" dims)? ("rotate" num)?
              ("center" coord)? ("radius" num)? ("from" num "to" num)?
wallref   ::= id ("north"|"south"|"east"|"west")
coord     ::= num "," num          dims ::= num "x" num          pct ::= num "%"?

Comments run from # to end of line. CJK quotes (“”) are accepted as ASCII quotes.


Interactive editing

Furniture and electrical fixtures move independently in room coordinates. A simple room exposes east, south, and corner resize handles that rewrite native dimensions; the room body itself does not drag, keeping furniture selection unambiguous. Shared-wall openings remain topology-validated.

Multi-floor plan sets

Use floor N "Label" to divide one source into framed floor plates. All plates share one drawing scale; stack horizontal|vertical controls the sheet arrangement.

floorplan "Two-Storey Villa" unit m stack horizontal
floor 0 "Ground Floor"
room hall at 0,0 size 6x4
furniture stairs S1 in hall at 4,0.4

floor 1 "First Floor"
room landing at 0,0 size 6x4
furniture stairs S1 in landing at 4,0.4

The optional furniture instance id (S1) registers the same stair run across levels. The lower occurrence becomes UP, upper occurrences DN, and offsets over 0.1 m warn. Room references, wall rules, doors, furniture, and arrays are floor-local and cannot leak into another floor section.

Found this useful?

Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.