Skip to main content
A mass is the building as a simple volume. It is one or more extruded outlines, stacked. Use a mass at the start of a design, before walls exist, to test the size, the height and the floor area. For a complete site study with multiple buildings, zoning, feasibility estimates and option comparison, see the Site massing playbook.

Before you start

You have a session from Start a building. You use one session for the whole guide.

Write the storeys and the mass

This building has three storeys. The mass has two parts: a podium for the ground storey and a smaller tower for the two storeys above it.

Set the site and the mass

Both go into the session as commands. replace-site gives the building a lot and its zoning rules. replace-mass sets the mass and its storeys in one step. A storey that is not in the list is removed, and a new storey id adds an empty storey.
The mass belongs to the building, not to a storey. Each part of the mass names the storeys that it contains. Floorkit builds the two volumes, and one undo takes back each step.

Read the floor area

After the build, get the mass from the session and read its quantities.
For this mass the result is 192 square metres: 96 for the podium and 96 for the two tower storeys.

Change the mass

Each change below is one command and one undo step. Height. massSegmentHeightCommand gives the replace-mass command for a new height of one part. The height snaps to whole storeys, at the pitch of the top storey. It adds storeys with new ids, or removes empty top storeys, and it stacks every storey above again. It returns undefined when the height does not change.
Area kind. A storey has an areaKind: gross, balcony, core, basement, parking or mechanical. A parking storey does not count toward the floor area ratio, unless the zoning rules list that kind in countsTowardFAR. replace-storey-settings sets it. It replaces all the settings of the storey, so give them all.
Colour. Each part has a colour. A part takes its own color (#rrggbb), else the color of the mass, else the colour of its use (the use of the part, else of the mass, else the buildingType of the building), else #a0b8c8. The colours by use are in MASS_COLORS_BY_USE: they follow the land-use colours of US planning maps (residential yellow, retail red, office a lighter red, civic blue, industrial purple, parking grey). massSegmentColorCommand gives the replace-mass command that sets the colour of one part, or takes it away with undefined. The 3D model and the plan draw the part in that colour.
To use other colours by use, give your own table as the build option massColors where the project is opened: ProjectManager.open(text, myColours). The 3D model, the plans and the sheets of that project then use it. It replaces the whole table; a use that it does not list takes #a0b8c8.
Footprint and storeys. To change a footprint, or to add and remove storeys, send replace-mass again with the new mass and the new storey list, as in setSiteAndMass. A new building. massBuildingCommand makes the add-building command from an outline in site coordinates. It checks the outline, stacks the storeys from the site grade and gives ids that are new in the whole model.

Edit the mass in 2D

A plan view does not draw the massing unless you ask: the switch showMassing is off by default, so existing plans and sheets do not change. Turn it on with replace-project-item on the views of a ProjectManager (one undo step), then mount the plan editor for that view.
The plan then draws every building’s mass with its parts, the parcel (a continuous line) and the setback line (dashed): a mass inside the dashed line passes the setback check of evaluateZoning. The parcel and the setbacks are only drawn; a click passes through them. The user clicks a part, drags a corner or edge dot to reshape it, drags the part to move it, drags the round grip to turn it, and presses Delete to remove it. Each gesture is one replace-mass and one undo step, as in 3D. The plan has no height grip: change the height in the 3D editor, or type it with massSegmentHeightCommand. onDrag is on both editors (GUIEditor.onDrag in 3D), so you can show live numbers while a drag is in progress. Sheets and PDFs show what the plan shows. Draw it in the plan. plan.startMassDrawing({ storeyHeight: 3, storeyCount: 4 }) lets the user click the corners of the outline: a click on the first corner or Enter closes it, and Escape cancels. It saves the same add-building as one undo step and resolves with the id of the new mass, or with undefined if the user cancels. startOutlineDrawing returns the outline alone, as site XZ points, and saves nothing; an app can pass that polygon to massBuildingCommand or use it for something else.
See the ManagedPlanEditor API and Add a plan editor.

Check the zoning rules

evaluateZoning is pure. It does not read the session, so you run it again after each step. Give it the lot, the masses and the rules.
With the rules above the mass is within the limit at first (192 m² on a lot of 612 m² is a ratio of 0.31). When you raise the tower to 9 m, the ratio is 0.39 and the report names exceeds-far. When you make the ground storey a parking storey, it counts 144 m² and the ratio is 0.24. To change a rule, send replace-site with the new lot. It replaces the boundary, the grade and the zoning together. The podium is 4 m from the lot line, so a setback of 5 m puts it in violation:
Call session.undo(session.revision) to go back one step. See Undo and redo.

Edit the mass in 3D

With a 3D editor bound to the session (see Add a 3D editor), the user edits the mass with the pointer. A click selects a part, the podium or the tower. The push/pull grip changes its height, the move and turn grips move or turn it, and Delete removes it. Each gesture saves one command and one undo step. GUIEditor.onDrag gives the live target before the save, so that you can show live numbers such as the floor area. See the GUIEditor API and massSegmentHeightCommand.

Turn the mass into walls, slabs and roofs

When the volume is correct, massToShell makes a building with real elements from it. Each storey gets an outer wall. Each part gets floor slabs and a flat roof.
Pass massToElements to replaceBuilding. This opens a new session, and the undo history ends. The new building has no mass, and its id is the id of the mass plus -shell: here building-mass-shell. The storeys keep their ids. Use the new building id in your edit commands.

Rules

  • A footprint is a list of [x, z] points in metres. A hole in a footprint is a courtyard.
  • The parts stack from the bottom to the top. The first part starts at the elevation of the mass.
  • The height of a part must be the sum of the heights of its storeys. If it is not, the model is not valid.
  • A storey belongs to one part only.
  • use can be residential, office, retail, hotel, civic, industrial, parking, mixed or other. A different word gives a warning.
  • The storeys of a mass can be empty. They do not need walls.
  • A colour is a #rrggbb string. A command with another colour is refused with invalid-command.
  • A plan view shows the mass when the view has showMassing: true; the plan editor then edits it. See Add a plan editor.
  • Sections and elevations exclude masses. Turn the mass into a shell when you need physical cuts.

Next

Define a room

Give names and areas to the spaces in a storey.

Building API

See each option and each quantity of a mass.
Last modified on October 14, 2026