Try the worked study
Use Controls to edit buildings, review Results, or save and download Options.Compare two options
- In Edit, choose Add second building once. Floor area becomes 384 m² and FAR 0.64.
- In Options, name this Baseline and choose Save option.
- Return to Edit, select the tower in Building part, enter 9 m for Part height, and press Enter. Floor area becomes 432 m², FAR 0.72, and the study reports one issue.
- Save this as Taller tower in Options. Compare the cards or use Reopen to return to either design. To undo instead, close the Controls drawer with × if it is open, then choose Undo.
Understand the results
The example uses an illustrative FAR limit of 0.7, coverage limit of 40% and height limit of 15 m. On this 600 m² parcel, FAR 0.7 allows 420 m² of counted floor area. The baseline uses 384 m², leaving 36 m² below that limit. The taller option uses 432 m², exceeding it by 12 m² even though its height is below 15 m.
Pass means the design meets the checks encoded for this example. It does not establish planning approval, structural support, daylight, access or whether homes and parking spaces physically fit. Use the applicable site rules and record their source before applying the method to a real project.
To test another constraint, set Front setback to 5 m. Both buildings are 4 m from the front edge, so both fail that setback check. Undo restores the original 3 m rule.
Common questions
What should I change first?
What should I change first?
Add the second building, then raise the tower part from 6 m to 9 m. Watch floor area and FAR
change. Use Undo to return to the previous design.
What do FAR and coverage tell me?
What do FAR and coverage tell me?
FAR measures counted floor area across all floors relative to the parcel. Coverage measures land
covered at ground level. The baseline uses 384 m² on a 600 m² parcel: FAR 0.64 and 24% coverage.
Another floor can increase FAR without increasing coverage.
Why does the taller option fail?
Why does the taller option fail?
The sample FAR limit allows 420 m². The taller option has 432 m², so it exceeds that limit by 12
m². Its 13 m height is still below the 15 m height limit. Results shows the affected rule.
Are these the rules for my site?
Are these the rules for my site?
No. They are sample inputs for learning. Use the applicable parcel measurements and planning
controls for your site. A passing report covers the supplied checks; it is not planning
approval. See the calculation limits before relying on a
result.
How do I compare and keep my designs?
How do I compare and keep my designs?
In Options, save each design with a name. Reopen returns to an option saved in this session.
Choose Saved options in Download to keep the designs and assumptions before closing the page.
This example has no file-import control; a Floorkit app can reopen a downloaded project.
Does the home estimate prove how many homes fit?
Does the home estimate prove how many homes fit?
No. The baseline has 288 m² of residential floor area. At 80% efficiency and 60 m² per home, the
estimate gives three homes. It does not test room layouts, stairs, daylight or parking fit.
Change those assumptions in Options.
Understand the terms
The study counts all gross floor area toward FAR. Actual area definitions and exclusions depend on the rules for your site.
Build this with a coding agent
If you want your own site feasibility app, give a coding agent the brief below. For an AI agent that changes designs inside your app, also follow Agent building workflow: your app provides the AI model and supported editing tools. The recipes use massing APIs planned for Floorkit 1.2.0. Check the installed package and itsindex.d.ts against the changelog before using them. A docs page does not establish that the release is published.
Give the agent the documentation index, this playbook as Markdown and documentation MCP setup. These resources help it read the APIs; the documentation MCP does not edit a design.
Build the app
The following recipes are for developers. They reproduce the interactive example above. For a smaller first step, use Model a mass.Prepare the app
Complete the installation and initialize the geometry kernel before constructing aProjectManager. You need a Three.js scene, a container for the plan editor, and a panel for quantities and violations. A deployed app also needs a hostname license key.
Keep one ProjectManager per open option. Send changes through manager.apply, and connect both editors to that manager so the model, views, saving and undo share one history. Geometry uses metres, Y is up, and footprint points are [x, z].
Define the parcel and its controls
This worked study uses a 30 × 20 m parcel with a retail podium and residential tower. Its controls are illustrative inputs: FAR 0.7, coverage 40%, height 15 m, setbacks 3 m, and building separation 4 m. Supply the applicable values and keep their source and date in your app; Floorkit’s presets contain example numbers. ThelotLines entries correspond to consecutive outer-ring edges, including the last edge back to the first point. Here the edge from [0, 0] to [30, 0] is the front. Explicit classifications let the zoning evaluator apply each class’s setback directly.
The study assumes a surveyed parcel with no holes and flat grade at world Y = 0. FAR and coverage use the full net parcel area, 600 m², after subtracting any parcel holes. This is not the area inside the setbacks. If the applicable controls require deductions such as road reservations, establish that area basis in your app before comparing results. Record the rule source, effective date, grade datum and unresolved constraints alongside each study. The example labels its controls as illustrative; access, daylight, terrain and parking fit are not evaluated.
holes in a segment footprint.
Two towers on a common podium are not one native branching mass. Use separate buildings and partition the shared podium so its floor area is counted once, or model one podium with separate towers starting at its top. Recheck collisions, separation and aggregate quantities. Never duplicate the full podium under each tower: that doubles its floor area. The worked study uses a single podium/tower stack and a separate building at grade.
Open a project and show the site
Use a saved plan view withshowMassing: true. It draws every building’s mass, the parcel and the dashed setback boundary. The parcel and setbacks are display geometry and do not catch clicks.
manager.root to your Three.js scene once. Bind a GUIEditor with manager.bindSceneEditor as in Add a 3D editor. The envelope switch shows the buildable volume in 3D and refreshes after a site edit. It is a display setting; enable it again after reopening. A dashed plan setback shows the boundary at grade, so also evaluate height and inclined envelope planes numerically.
Pass a visible error handler to openStudy so a refused editor action explains its reason beside the model. When both editors stay mounted, route history shortcuts through the app once and clear the inactive editor’s selection; hiding its canvas alone does not disable its keyboard handlers.
Add and edit buildings
For a known footprint, make a command from the current model. This second building has four residential storeys on a 6 × 8 m footprint, 4 m from the podium.addSecondBuilding once for the worked study. For interactive creation, call drawBuilding instead: click to add corners, click the first corner or press Enter to finish, and Escape to cancel. Completion adds a new building as one undo step. startOutlineDrawing returns a polygon without saving it when your app needs its own creation flow.
Move, turn and Delete act on the selected part. Deleting the last part removes the mass; it does not remove the building. Use
remove-building to remove a whole building. The manager refuses removal while a saved view references its storey; change or remove that view first and dispose any editor mounted on it. At least one building must remain.
A gesture saves one command and one undo step. Height changes snap to whole storeys; shrinking cannot drop a storey containing elements or referenced by a view. For a custom footprint or storey edit, send replace-mass with both the mass and the complete storey settings. Use manager.undo() and manager.redo() for the shared history.
Read the selected building and part before choosing the edit. Widen a ground-level footprint to increase floor area and coverage; widening only the tower increases floor area while this study’s coverage stays unchanged. Add storeys to increase floor area and height without changing coverage. Inspect the affected quantities and named violations, then undo or retain the change. Geometry accepted by the editor does not establish structural support, circulation, daylight, core layout or parking fit.
Recheck zoning after each change
Evaluate all masses together, so the result includes total ratios, collisions and separation. Model validation and zoning are separate: the SDK allows a design outside the parcel or over the limits so the user can inspect and repair it.metrics, compliant, and the full violations list. Each violation can name a ruleId, massId, pair of masses, or lot edgeIndex, plus current and limit when available. failureClass identifies one priority failure for a repair loop; it does not replace the list. An incomplete rule basis can produce missing-zoning-basis.
watchStudy refreshes after committed edits, undo and redo. It returns an unsubscribe function; call it when closing the study. Do not apply another command synchronously inside a subscriber. During a drag, the editor’s onDrag exposes the live target before commit: read the live mass’s quantities() for an area preview, then use studyReport for the saved design. The saved snapshot still describes the previous committed state during the gesture.
Compare the report with the expected study results.
Change the parcel or a rule
Build a site form in your app. Managed editors have no site-boundary anchors.replace-site replaces the whole site, so keep the fields you intend to retain.
z = 4, so the report shows setback violations and the displayed boundary changes. Undo restores the 3 m control. Keep geographic coordinates in geoAnchor and local metre coordinates in the boundary; trueNorthDeg records north, but does not provide a sun or shadow analysis.
Estimate feasibility and compare options
Usereport.metrics.perMass for the area by storey, use and area kind. Gross floor area and counted floor area are different: countsTowardFAR defaults to ['gross']. Mark parking, basement, core or mechanical storeys with areaKind through replace-storey-settings, supplying all their settings. Labels such as usage: 'parking' describe use; set the area kind explicitly when the counting assumption matters.
A storey’s floor area is its segment footprint area after subtracting courtyard holes; gross floor area sums those storey areas. Programme use describes what the area is for, while areaKind controls its counting category. An explicit areaKind takes priority over inference. Automatic basement classification requires the whole storey’s top to be at or below grade, not merely its base.
Keep efficiency, average unit size, parking ratios and targets in your app. For example, after adding the second building the residential area is 288 m² (96 m² in the tower and 192 m² in the second building). With an assumed 80% efficiency and 60 m² average unit size, it gives 230.4 m² estimated usable residential area and three whole units.
manager.save(). The project format holds one building model; store option names, comparison rows and assumptions in your app rather than adding unknown fields to Floorkit’s JSON. Compare the reports under the same site and rule set. Use ProjectManager.open(text) to reopen an option, construct the replacement before disposing the old manager, and remount its editors. Undo history is not saved.
siteBasis differs, mark it as a different study basis instead of ranking it as an equivalent alternative. Save the app’s option records with their assumptions alongside each editable project.
Deliver the study
Save the editable project as the source of the design. Use a sheet viewport referencingsite-plan to deliver a site plan PDF; showMassing carries through to sheets and PDF. See Compose a sheet and Export a PDF.
The worked project includes an A3 site sheet at 1:100. manager.exportSheet('site-sheet', 'pdf') exports it. Deliver the option records, assumption and rule basis, and comparison report alongside the editable project and drawings.
For a GLB, follow Export a GLB, passing manager.root to Three.js’s exporter. Call manager.setBuildableEnvelope(false) before exporting the root: a raw GLB includes the visible envelope. GLB keeps geometry and colours; the project JSON keeps the editable design. Your app can export the report and comparison table as CSV.
When moving to detailed design, massToShell produces walls, slabs and flat roofs. It reuses storey IDs and creates a different building ID. Replace the mass building in a copied project, update views that explicitly name the old building, then open the new project. This starts a new history; keep the massing option separately. See Turn the mass into walls, slabs and roofs.
Sections and elevations exclude masses. Use the massing plan and 3D view for this stage, or create a shell for physical cuts. Terrain, neighbour context, map tiles and sun/shadow analysis require app-side work.
Check the finished workflow
- Open the worked project, add the second building and confirm the pass row above.
- Raise the tower to 9 m, show
exceeds-far, and undo to the previous quantities. - Draw another building; Escape cancels without saving, while completion is one undo step.
- Select and reshape the tower in 2D, then change its height in 3D; confirm both views follow the same model.
- Change the front setback to 5 m, show the violations, and undo the rule change.
- Save and reopen; confirm the site, rules, masses and massing plan persist, then enable the envelope again.
- Export the site plan PDF and a GLB with the envelope hidden; retain the editable project alongside them.