Skip to main content
A building model is one JSON document. It describes the building with numbers and ids, not with meshes. Your app, your server and an AI agent can all read it and write it.

Structure

A model contains buildings. A building contains storeys. A storey contains the elements. Curves are fields on the element, never a separate list. A wall takes arcs (one per segment, null or { through }). A slab and a flat roof with no overhang take cornerRadii (outerRing and holes, one entry per corner of profile, metres, null for sharp). A railing takes arcs (one per segment of its path) and cornerRadii (one per interior corner). A space takes arcs (outerRing and holes, one per edge), and a room separator takes arcs (one per segment). Railing, space and separator arcs are saved, validated and built as arcs. A building can also have grids and extra datum levels. They draw on plans, sections and elevations, and they have no 3D body. A building can also have a mass. A mass is the building as a simple volume, for the early stage of a design. See Model a mass.

A small model

The header fields

Opening types

Floorkit saves the type’s fields on each door or window that refers to it. The type’s optional own list names fields each opening can set independently. The default is an empty list. Openings keep their own placement and facing. A schedule uses the name of a matching type.
  • add-opening-type adds a type with a model-wide typeId, a kind of door or window, a name and its fields. remove-opening-type refuses a type still in use and names its openings in an opening-type-in-use issue.
  • set-opening-type assigns a matching typeId to a door or window. Include wallId for a hosted opening and omit it for a free opening. Set typeId: null to detach the type and keep every saved opening value, including size and facing.
  • add-hosted-opening and add-free-opening accept a door or window with a typeRef. Supply its placement and any width or height the type lists in own. The command can omit dimensions supplied by the type. The type’s values take precedence for its governed fields.
  • replace-opening-type updates the type and every opening that uses it across the model in one edit. When a formerly fitting hosted opening would stop fitting, the command refuses the whole change with opening-does-not-fit and names the affected openings. A successful replacement is one Undo in a building session.
A direct replacement or width grip that changes a type-controlled field reports an opening-field-by-type issue naming the field. A saved mismatch produces an opening-differs-from-type warning and draws as saved. When a building session opens a missing or wrong-kind reference, it clears the reference and its turn marker, keeps the saved values, and reports opening-type-unresolved. A new or changed typed window layout can have up to 64 grid sections across the whole window, including fixed sections and sections that open. Decorative glazing bars subdivide a section separately. If a layout exceeds the limit, Floorkit refuses the edit and keeps the previous model. Existing saved layouts still open normally, and edits that leave the grid layout unchanged can proceed.

Plain wall openings

A hosted void can use a rectangular, round or arched profile. A straight wall also accepts a custom void outline as a simple ring of 3–64 normalized points. The final point connects back to the first. The ring must reach all four edges of the unit square. A door’s leafAsset, a door or window’s fill, and custom profiles for framed openings remain reserved.

Rules that keep a model valid

  • Each id is unique. You choose the ids and Floorkit keeps them.
  • A wall is a line of [x, z] points. For a closed room, set closed: true. Do not repeat the first point. A segment can be an arc: see Add a curved wall.
  • A door or a window is an entry in the openings of its wall. Its offset is the distance of its centre from the first wall point, along the saved wall points. When a wall ends inside a different wall, Floorkit draws the end to the line of that wall. The door does not move: its offset still counts from the first saved point. A model saved before version 5 counted from the drawn end; when you open such a model, Floorkit changes it to version 5 and changes each such offset so that the door stays where it was drawn (migrateHostedOpeningStations). A model with no such door keeps its version.
  • Every plan turn is in degrees, counter-clockwise when you look from above, as in CAD: from +X toward −Z. This is a column’s and a stair’s rotation, a roof’s and a context building’s ridgeDirection, a free door’s or window’s yawDeg, a block’s rotationYDeg and a note’s rotationDeg, and the yawDeg of every command. A model saved before version 6 turned columns, stairs, ridges and free openings clockwise; when you open or draw such a model, Floorkit changes it to version 6 and negates each of those turns, so nothing moves (migratePlanRotations). A model with no such turn keeps its version.
  • The elevation of a storey is its height in the world. The elements of the storey use offsets from that height.
  • A railing has a path or a host, not both. With a host, the railing follows its stair.
  • Each size must be a positive number. The check refuses a size such as 0 or the text "0.2", and gives its path and value.

Check a model

validateBuildingModel reads a document and returns each problem with a path, a code and a message. It does not need the geometry kernel, so you can also run it on a server.
The check does not know whether a door or a window fits its wall. Only the build knows the joints of the walls. The build draws an opening that does not fit without a hole, and gives the warning opening-does-not-fit in BuildResult.warnings. See Doors and windows in walls.
This check makes the model a good target for an AI agent. The agent writes the document. If the check finds a problem, give the path and the message back to the agent and let it correct the document.

What is not in the model

  • Meshes and other geometry. Floorkit builds them from the model.
  • Views and sheets. They are in the project file, next to the model.
  • Undo history. It belongs to the session.

Agent proposals

Use the agent building workflow to turn unknown JSON into an editable project. Preserve IDs and return validation issues to the agent. A valid document can still fail during geometry construction; keep the existing project until its replacement builds. The TypeScript contract is not a downloadable JSON Schema or an LLM tool definition. Your app supplies its AI provider and tool inputs. Build with agents explains the documentation and application boundaries.

Next

Coordinates and units

Learn where each number is measured from.

Model types

See each field of the document.
Last modified on December 1, 2026