Skip to main content
Glama
Tetragon
by wckdboy

Tetragon

FreeCAD BIM modeling with an MCP server, command line and native workbench. Explicit building parameters and source evidence become editable solids, quantities and scaled drawings. Danish address services provide site context; original plans and photographs provide architectural evidence.

Version 0.1.0 is a working modeling toolkit. An address alone does not supply reliable dimensions or produce a verified as-built model.

Capabilities

  • Site/building/storey hierarchy, layered straight walls, hosted windows and panelled/glazed doors with real cuts, layered polygonal slabs, sloped projecting sills, rectangular gable/mono/flat roofs, and profile sweeps for cornices, gutters and other details.

  • 20 built-in families, including 360/480/600/700 mm masonry, IdealCombi/UnikFunkis/Vrögum reference joinery and four Danish steel balconies. Separate sash/glazing, unequal window rows, recessed openings, single/double glazed doors, individual deck boards and railing members; versioned custom presets.

  • Mitered two-wall corners and deterministic butt/T/cross joins, preserving each wall and its layers. Native thickness edits update neighbouring walls and hosted openings. Builds audit wall overlap volume and supported-end contact, plus interior alignment and opening conflicts.

  • Editable FCStd, STEP and IFC4 exports. Linked native TechDraw pages, SVG and vector PDF sheets/booklets on A3/A2/A1: architectural plans/sections with joined wall poche, hatch, opening dimension chains, room labels/areas, door swings, storey levels and opening tags; façades use TechDraw hidden-line projection. Selected-element sheets support larger-scale details.

  • Numbered sheets with revision/date/status, model-linked dimensions and level markers, street/address annotations and source-aware sill schedules. Cadastral boundaries are site-plan-only; red dash-dot party-wall lines require an explicitly identified separating wall or adjoining gable/brandmur.

  • Optional presentation sheets: bold plan cuts and room washes, coloured masonry/tile façades, compact Tetragon framing and model-derived axonometric renderings. A4/A3/A2/A1 are available. Plans/façades remain vector; axonometric views embed a depth-buffered model image. Surface colours and courses are illustrative, not product specifications.

  • IFC storeys, stable element IDs, opening/void/fill relationships, material labels, source-evidence properties and optional map conversion.

  • Datafordeler DAR/BBR v3 queries, Skråfoto image catalogue and Dataforsyningen WMS maps.

  • Hashed local references, two-point plan calibration, traced-point conversion, evidence status, atomic revisions and rollback.

  • 39 MCP tools, a project schema resource and a reconstruction prompt. No arbitrary Python execution tool or network control port.

The drawing study demonstrates two storeys, layered floors, cornices, external sills, a separating wall, separate site/floor views and a nine-sheet set. All its addresses and boundaries are synthetic. The family showcase demonstrates the requested wall thicknesses, three joinery references and four balcony styles, with a 1:20 detail sheet. The public building example is a synthetic 35-element building-envelope study with two storeys. It has no interiors or surveyed address.

The presentation study demonstrates an 864-element apartment block with 50 interior walls, 44 room outlines, eight outward-door balconies, internal return stairs and slab openings, external stairs, fitted kitchens/WCs, furniture, closed gables, cornices, sills, gutters/downpipes and 11 sheets. Three A3 1:20 balcony details dimension width, projection, guard/frame height and clear stair access. Dimensions, layout and address are synthetic; structural connections are not engineered. Stair parts use the existing slab/sweep tools.

Related MCP server: FreeCAD MCP Server

Setup

Use Python 3.11–3.14 for Tetragon and a separate FreeCAD Python with FreeCAD, Part, BIM and TechDraw available. IFC also requires FreeCAD's IfcOpenShell. Verified here: macOS ARM64, FreeCAD 1.1.4, Python 3.11. Linux is supported by the process/file-lock implementation but untested. Windows is not supported in this version.

uv sync --python 3.11 --locked
export TETRAGON_FREECAD_PYTHON="/Applications/FreeCAD.app/Contents/Resources/bin/python"
uv run tetragon doctor
uv run tetragon --workspace .tetragon load examples/courtyard-house.json
uv run tetragon --workspace .tetragon build demo --formats fcstd step svg ifc

load creates a project once; updating requires its current --revision. Each successful build prints JSON with a new immutable output directory, exports, bounds and quantities. Failed builds leave the previous successful build intact.

The default workspace is ~/Documents/Tetragon. Set --workspace or TETRAGON_WORKSPACE consistently. --source-root / TETRAGON_SOURCE_ROOTS allow reference imports from specified directories; the workspace is always allowed.

New device

On a new Mac (Apple silicon), in this order:

  1. FreeCAD 1.1.4. Install the official release into /Applications; Tetragon finds its Python there.

  2. Blender 5.2.1 LTS. Install it into /Applications, or set TETRAGON_BLENDER to its executable.

  3. uv, from docs.astral.sh/uv or brew install uv. Then, in the checkout:

uv sync --python 3.11 --locked
uv run tetragon configure-key datafordeler        # hidden prompts; see Secure API keys
uv run tetragon configure-key dataforsyningen
uv run python scripts/fetch_render_assets.py --workspace .tetragon
uv run tetragon --workspace .tetragon doctor
uv run python scripts/install_workbench.py --freecad-python /Applications/FreeCAD.app/Contents/Resources/bin/python

doctor prints JSON. Besides FreeCAD and the keys it reports Blender, the client profile sales material resolves to, every render pack (installed or specified in render-packs/, each file checked against its SHA-256) and the free space on the workspace volume. warnings lists what is missing; it is empty on a device ready for full-quality output. Without a client profile, sales decks use the neutral profile.

fetch_render_assets.py rebuilds the render asset packs described in render-packs/: Poly Haven and ambientCG CC0 sources, downloaded into a temporary folder and checked file by file against SHA-256. The few maps that cannot be downloaded (seeded procedural slate, graded brick and grass) are regenerated by scripts/derive_render_maps.py with pinned Pillow and NumPy. Each pack is then imported with the regular importer, so its manifest is the one the spec records. Rerunning skips packs that are present and intact. A pack that differs stops the run.

This Mac

FreeCAD uses a retained official DMG because there was insufficient disk space for a second app copy:

~/Library/Application Support/Tetragon/runtime/FreeCAD-1.1.4-arm64.dmg

scripts/freecad-macos verifies the image checksum before mounting and remounts after reboot. The installed runtime/freecad-python symlink is detected automatically; no runtime environment variable is needed on this machine. Unset a stale TETRAGON_FREECAD_PYTHON override. Keep this repository in place because the launcher and addon link to it.

scripts/freecad-macos --launch
uv run tetragon --workspace .tetragon build demo --formats fcstd step svg ifc

The launcher does not download software. On another Mac, install FreeCAD normally or retain the matching official FreeCAD release. Expected image SHA-256: 071343b4abb70492b75c973f41eaf1d2528f9b9c7ea018d22a4f46ae14d27ac0.

Native workbench

uv run python scripts/install_workbench.py --freecad-python scripts/freecad-macos

For a regular installation, pass its bundled Python. The installer detects FreeCAD's versioned user data directory and adds one reversible symlink. Restart FreeCAD and choose Tetragon. Its commands toggle Tetragon Studio and the project browser, open a model, build a workspace project, inspect selected element evidence and browse family parameters.

Tetragon Studio

Brand. Tetragon's mark (assets/icon.svg) is three nested L shapes and a small square in white on blue #0070FF. Interfaces use white surfaces with that blue as the accent. Studio follows the same scheme in FreeCAD's dark theme, as do the workbench and command icons. Sheet frames carry the mark and a blue TETRAGON wordmark, and the default sheet accent_color is now #0070ff. Projects that set their own accent keep it on the frame's bars. The sales booklet's default wordmark, used when no client logo is supplied, is the mark plus TETRAGON; its colours and wording come from a client profile.

The first toolbar button opens a dockable Studio panel. It follows FreeCAD's light or dark theme and has seven tabs:

  • Project: workspace projects with revision and latest build; build, open the model as built or Live (see the project browser below), drawings or folder. Status chips show the FreeCAD runtime, the keys and Blender.

  • Site: address search (DAR prefix; note DAR writes for example H.C.Andersens Boulevard without a space), the base map or orthophoto with GeoDanmark building outlines, and BBR facts.

    • Create project from outline starts an estimated project: storeys from BBR, exterior walls along the roof outline.

    • Bind to project records the address and IDs. An existing georeference is kept, so modelled geometry does not move.

    • Draw in FreeCAD adds the outline as a polyline.

  • Skråfoto: the newest oblique photo per direction, cropped around the building with the published camera model (approximate, not rectified). Add any view as a source.

  • Sources: the project's references. Drag in PDFs or images, or use Add files…; files are copied and hashed. PDFs show an icon because FreeCAD's PySide has no QtPdf.

  • Families: a Families | Profiles switch at the top.

    • Families lists built-in presets and the workspace's custom families, searchable and grouped by kind, with Built-in/Custom and Reference/Concept chips from each preset's product metadata.

    • Selecting one opens a form generated from family-schema, in sections per kind (for a balcony: Size, Railing, Handrail and deck, Underside, then collapsed Shape, Fixing and privacy screen, Frame and Appearance). A section opens itself when it holds a changed value, or one the family sets (a door's transom), and shows how many changed. Fields: bounded spin boxes with units, combos, checkboxes, comma lists for ratios, a layer editor for walls, JSON for structured parameters. A dot marks each value changed from the family, with a per-field reset.

    • A live preview draws the window or door elevation (bays, sashes, sprosser, leaves, sidelight, transom, swing marks: dashed for inward), the balcony plan and front elevation, a wall's layer section or a sweep profile. Openings and balconies use the build's own layout code (opening_layout, render_mesh). Click it, then scroll to zoom; drag to pan; double-click or Fit to refit; the expand button makes it taller.

    • About 0.4 s after an edit, instantiate-family --validate checks the values; errors appear under their field, cross-field rules above the form, and Insert/Save stay disabled until it passes.

    • Save as custom… stores a variant in <workspace>/_families/; saving an existing ID updates it at its expected revision, and a conflict says so with a Reload action. The supplier reference is kept by default, unless a changed value is one of the preset's published dimensions; the dialog then says so and leaves it unticked.

    • Insert… reads the current project, then asks for the element ID, storey and placement: host wall, offset and sill for openings; origin and rotation for balconies and roofs; start, end, role (exterior or interior) and the roofs or sweeps that cap it (cap_by) for walls; a path table (z above the storey) for sweeps. It shows the batch and applies it with tetragon apply at the project's current revision. If the batch fails, the dialog stays open with the error under the input it names (host, offset, sill, wall ends, path); on success the banner offers Build.

    • Edit selection opens the Tetragon element selected in the FreeCAD model in the same form, with Identity and Placement sections and, for walls, check lists for cap_by and trim_by. Apply changes saves it as a revision-checked batch; it is checked with validate-element as you type.

    • The copy button puts the element JSON on the clipboard.

  • Profiles (inside Families) edits sweep profiles: x left of the path direction, y up, with the path at the origin crosshair.

    • Drag a vertex (snap off, 1, 5 or 10 mm); click an edge to add one; Delete removes the selected one; arrow keys nudge it. Voids are edited the same way: choose the ring, Add void, Remove. The mm grid adapts to the zoom.

    • Self-intersections, short edges, coinciding vertices and voids outside the outline are drawn red as you edit, with a sentence naming the edges and the build's own verdict. Width, height and area are shown. The vertex table and the canvas follow each other; undo and redo (⌘Z, ⇧⌘Z) cover every edit.

    • Generators (rectangle, half-round and box gutters, stepped and ogee cornices, L-angle/flashing, handrail, eave kick) and transforms (mirror, rotate 90°, origin to a corner, move by).

    • Save as family… stores a sweep, cornice or gutter family with material and display colour; coordinates are rounded to 0.1 mm. Create in project… sweeps the profile along a typed path, or the wire or edges selected in FreeCAD (converted to storey-relative z), and applies it like Insert. Opened from a sweep family's form, Use in family returns the edited profile to that form.

  • Assistant:

    • Claude Code runs claude -p in the panel with only Tetragon's MCP tools allowed: no shell, file edits or web access. Follow-ups resume the same session.

    • T3 Code starts or continues a T3 Code thread (t3 thread start/send --wait) or opens the project in the T3 Code app (t3 app).

  • Settings: masked Datafordeler/Dataforsyningen key fields. Save passes the key to configure-key --from-file through a private 0600 file that is deleted immediately. Test runs a small live call. Workspace and runtime paths are shown here too.

All Studio work runs asynchronously through python -m tetragon.cli in the project environment; FreeCAD's own Python needs no extra packages. The family commands Studio uses mirror the MCP tools and print JSON:

tetragon families --all                      # built-ins and custom families; plain `families` is unchanged
tetragon family-schema window                # form field specs: type, min/max, default, enum, unit, help
tetragon save-family family.json [--revision N]
tetragon instantiate-family danish-casement --parameters p.json --validate
tetragon apply PROJECT batch.json --revision N   # elements, remove_elements, notes; atomic
tetragon validate-element element.json       # {valid, errors}; used when editing a placed element

The saved family library has its own commands, for scripts and a family browser:

tetragon family ID                           # resolved parameters, lineage, children, usage
tetragon family-history ID                   # every revision, newest first
tetragon restore-family ID FROM_REV --revision N
tetragon family-from-element PROJECT ELEMENT NEW_ID --name NAME [--extends PARENT] [--tag T]
tetragon place-family PROJECT ID instances.json --revision N [--replace]
tetragon link-family PROJECT ID ELEMENT... --revision N
tetragon update-family-instances PROJECT ID --revision N [--element E] [--dry-run]
tetragon family-usage [--family ID] [--project P]
tetragon repeated-elements [--project P] [--kind K] [--ignore width_mm] [--min-count 2]

--validate and validate-element return {valid, errors: [{loc, msg}]} (with the element for the former) and exit code 0; missing placement (host, path, wall ends) gets neutral stand-ins, and host fit is checked by apply. tetragon.profiles (standard library only) has CCW sweep-profile generators (rectangle, half-round and box gutters, stepped and ogee cornices, L-angle/flashing, handrail, eave kick), transforms, metrics and checks that use the build's own polygon rules in tetragon.geometry2d. GUI QA: scripts/freecad-macos --launch scripts/verify_studio.FCMacro (see that file for its environment variables).

Project browser and live models

The project browser (its toolbar button, or Studio's Live) is a dock beside the model tree, laid out like Revit's Project Browser. It shows the active model's project, else the one chosen at its top:

  • Views (all): the project's drawings by view type (Floor Plans, with site plans; Elevations; Sections; 3D Views) and scale. Double-click opens the sheet from the latest build.

  • Sheets (all): as number - name. Double-click opens the sheet.

  • Families: the families in use, by category (Walls, Windows, Doors, Floors, Roofs, Balconies, Wall Sweeps, Sweeps, Gutters), with their instance counts. Selecting one selects its instances.

  • Levels: each level with its elevation, its elements by category, and each element. Selecting rows selects their elements in the model, and selecting in the model selects their rows. (Revit's browser has no element list; this is Tetragon's.)

  • Builds: the newest 20 with their revisions; double-click opens one as it was built.

  • A filter matches names, ids and details.

Go live keeps a model in step with its project:

  • It opens a private copy of the latest build in the temporary folder, so builds stay immutable. The copy drops the build's sheets, which draw every element and would redraw on every change.

  • It brings the copy to the current revision, then follows every revision the CLI, MCP or Studio saves. Each one reaches the model only after tetragon project has validated it.

  • A change is rebuilt element by element (freecad_native.sync_document): the elements added, removed and changed, the walls whose corners and junctions may follow a changed wall, and whatever FreeCAD finds depending on those. The result matches a fresh build of that revision; the native tests compare them element by element. An element deleted from the model by hand comes back with the next revision.

  • When levels are added, removed or reordered, or the latest build came from an older Tetragon, the browser offers Build and then reopens live from the new build.

  • If a saved revision doesn't validate, the model keeps the last good one and the browser says why. Elements whose rebuilt geometry is invalid are counted in the status line; the build stays the gate (validity, wall joins, roof caps, head-arch clashes).

  • Closing the model ends the session and deletes the copy.

project.json stays the source of truth, and the live model writes nothing back yet: edit through Studio, the CLI or MCP. The session reads the project with:

tetragon project PROJECT     # the validated project, exactly as the FreeCAD worker receives it

Working as in Revit

The Tetragon workbench lays FreeCAD out as Revit: a ribbon with Revit's tabs (Architecture, View, Modify, Manage), the Properties palette above the project browser on the left (FreeCAD's Model panel is a tab behind the browser), and an Options Bar under the ribbon while a tool runs. Tetragon models navigate as Revit: the wheel zooms, a middle drag pans, Shift and a middle drag orbit (FreeCAD's own Revit navigation style; Tetragon › View › Revit navigation turns it off). Other documents keep FreeCAD's settings.

Open and edit. Open (Ctrl+O) lists the workspace's projects, MCP-made ones included, and opens one live; a project without a build is built first. Every edit is saved to the project through tetragon apply at the model's revision, validated, and the model follows:

  • Properties (PP): the selection's instance values under Revit's groups and names (Constraints: Base Constraint, Base Offset, Unconnected Height, Sill Height, Head Height…; Identity Data: Mark, Element ID), with the Type Selector above them. A value takes effect on Enter. Several elements show their shared values; mixed kinds show what they share.

  • Edit Type opens Type Properties: the type's values apply to every instance of the type, those of its family or, without one, those with the same type values. Duplicate… gives the selection a type of its own.

  • Undo (Ctrl+Z) and Redo (Ctrl+Y) restore project revisions (tetragon restore); Delete (Del) deletes elements with the openings they host and their names in other elements' trims and caps. Outside a live model these keys are FreeCAD's own.

Views. Floor plans draw their level's door swings, from the code the sheets use, and tag their rooms with name and area; sections and elevations draw the levels as dashed datum lines with their names and heights. Section: draw its line in a plan; the view looks to the left of the line as drawn and opens once saved. Level (LL): click its height in a section or elevation (snapped to 50 mm); the model is rebuilt for it, and Make Plan View (on, as in Revit) adds its floor plan. Grid (GR): click each grid line's start, then its end, in a plan; it is named on from the last (1, 2, 3; A, B, C; Z then AA), and the tool stays on for the next, as Revit's does. Plans draw grids at their cut, sections and elevations where they cross them, each with its bubble beyond its end. Click a grid's bubble, in any of them, to rename it: type the name and press Enter (Esc leaves it); a name another grid has is refused. Revit edits a selected grid's name there; Tetragon's grids aren't FreeCAD objects to select, so the click on the bubble opens the box. Floor Plan (View › Create) asks which levels, as Revit's New Floor Plan does, and makes a plan of each, named after its level and cut 1200 above it. Double-click a view in the project browser to open it in a window of its own, with Revit's tab title (Floor Plan: Ground plan, Section: A-A, Elevation: South, {3D}), a white background, an orthographic camera, the plan's view range (cut height down to its level), a cut fill where it cuts walls, floors and roofs, and a View Control Bar (scale, visual style, temporary hide/isolate). Open views are cut again after every revision.

Sheets. In a live model, a sheet under Sheets (all) opens as Revit's Sheet: A-101 - Ground plan, in a window of its own, drawn from the live model as it is now: by the build's own sheet job (tetragon.subtasks) in a FreeCAD process of its own, from a snapshot of the model's shapes, so it is what the next build's sheet will be and FreeCAD stays responsive. After each revision the sheet in front is drawn again (the others when brought forward); Refresh draws it on demand, Export PDF… saves its page; the wheel zooms, a drag pans, a double-click fits. Sheet (View › Sheet Composition) makes a sheet of several views, as Revit's Sheet and Place View do: its number (the next one, as Revit numbers sheets), name and title block size, and the views ticked, placed side by side; drag a view on the sheet to move it (the views already drawn are composed again, not drawn again). Each view keeps its own sheet. An outline sheet's title block now shows its sheet number in the corner that read "TETRAGON" (still there without a number). Without a live model, sheets open the last build's PDF.

Schedules. Schedules/Quantities (all) in the project browser lists Revit's starting schedules for what the project has: doors, windows, walls, floors, stairs and rooms (tetragon.schedules); Schedules (View › Create) opens one by category. A schedule opens as Schedule: Window Schedule in a window of its own, a row per element by level, type and mark, with its lengths, areas (wall areas less their openings, floors less their holes) and grand totals, and is filled again after every revision. As in Revit, typing into a cell of the row's own value (Mark, Sill Height, Head Height, a wall's height, a room's Name) edits that element, and a cell of its type's value (a door's or window's Width or Height) edits every element of the type; the edit is saved like any other, so Undo takes it back. Selecting rows selects their elements; Highlight in Model shows them in the view used last; Itemize every instance off lists each type once with its count; Export… saves CSV. Schedules aren't saved in the project: Tetragon's format has none. tetragon apply now takes rooms too.

Placing (Architecture). Wall (WA): click the start and each end; walls chain until Esc and show their length as a temporary dimension, and the wall's faces as it will stand. The Options Bar's Location Line is the line the clicks draw, as in Revit: Wall Centerline, Finish Face: Exterior or Finish Face: Interior (the centre line then stands half the wall's thickness in from the face drawn; Tetragon's exterior face is to the right, from start to end). Along a face, each wall of a chain runs to where its centre line meets the last one's, and the last to the first's where the chain closes, so the walls join at their corners. It stays as chosen for the next wall tool. Tetragon's walls have no core layer, so Revit's core options aren't offered. Every tool that takes points snaps as Revit does, nearest first, and marks the snap with Revit's glyph: wall and grid ends (a square), where wall centre lines and grid lines cross (a cross), a wall's midpoint (a triangle), onto a wall or grid line (an hourglass, Revit's Nearest; where a 15° direction meets it, if there is one), along a 15° direction, else to the 10 mm increment. So Aligned Dimension measures grid to grid: click by one grid, then by the next square across. Door (DR) and Window (WN): point at a wall, see the opening and its distances from the walls beside it to its centre, click to place it. Floor: sketch the boundary; click the first point again or press Enter (its top is at the level); or tick Pick Walls and click the walls around it in order. A click picks what the view cuts, as in Revit: in a plan, a wall before the floor below it; Pick Walls and doors and windows take the wall even through an opening. Roof (by footprint): two corners along one edge, then the width; the Options Bar sets the eaves height. Component (CM): a door, window or balcony family from the library (built-in and saved), placed on the wall clicked: openings centred there, balconies against its outside face. Gutter and Sweep: a gutter, cornice or sweep family along picked points at a height above the level; Enter finishes. A gutter also hangs on a roof's eave, as Revit's Roof: Gutter: point at an eave (a gable's long sides, a mono-pitch roof's low side, every side of a hip or flat roof) and click; it runs the eave's length with its rim at the roof's underside and its inner edge a quarter of its width in under the roof's edge. It follows the roof, as Revit's does: an edit to the roof (moved, turned, a new pitch or overhang) moves the gutters on its eaves in the same save, and deleting the roof deletes them. Tetragon records no host for a sweep, so a gutter is the roof's while it lies where that roof's eave puts it. Stair (Architecture › Circulation), sketched run by run as in Revit: click the middle of its first riser, then where the run ends; whole risers fill it, no taller than 180 with goings of 280 (Revit's defaults), and the Options Bar says "N risers created, M remaining". A run short of the top ends at a landing as deep as the stair is wide; the next click turns the next run off it, straight on, left or right. The run that reaches the level above finishes the stair; Enter gives the current run what remains. Actual Run Width sets its width. It is saved as one stair element (kind: "stair", below), listed under Stairs in the project browser; Properties shows Revit's stair values (base and top level, risers, riser height, tread depth, run width, runs, landings), and Move, Copy, Rotate and Mirror take it whole (mirrored, it is drawn the other hand). An older stair saved as separate parts (stair_<n>_…) still selects, lists and copies as one, and becomes a stair element when its values are edited. Desired Number of Risers, Actual Tread Depth and Actual Run Width are editable there: the stair is drawn again from its own parts, keeping its runs' risers, its turns and its name (the last run takes what a new riser count leaves). The opening in the floor above is yours to cut. Room (RM, Architecture › Room & Area): point inside walls and the room a click would place shows, its outline at the walls' faces and its area; a click places it, named on (Room 1, Room 2, …; rename it in a room schedule) and tagged where clicked, and the tool stays on. Its outline is the space the room audit finds there (room_audit.RoomRegions: walls cut 1 m above the floor, openings closed), so it passes the audit. One room per space, as in Revit: a space whose room tag stands in it already is refused, as are a click in a wall, a space the walls leave open, and one around a wall standing free (a room has no holes). Room Separator (Room & Area): click each line's start, then its end, in a plan; the lines chain until Esc. Each bounds rooms where no wall does, as between an open kitchen and its living room: Room, the room audit and its proposed outlines take it as a boundary, and the rooms either side meet on its line. A line that ends free or stands free inside a space changes nothing. It is saved as a room separation line (room_separators, below) and builds nothing; live plans and the build's working plans draw it as a thin line, sales plans don't. A click on a grid line, a room separation line or a room's tag, in a live floor plan with no tool running, selects it as Revit does, highlighted in blue (FreeCAD has no objects for them); Delete (the Delete key) then removes it from the project in one edit, and Esc or a click elsewhere lets it go. A click on a grid's bubble still renames the grid. apply takes remove_rooms too. The Options Bar sets level and type for each, and height and chain for walls; Esc twice or Modify (MD) ends the tool.

Modify. Move (MV) and Copy (CO) the selection: click the start point, then the end. Doors and windows slide along their wall unless the wall moves with them; copies get new ids and keep their openings with them. A moved wall keeps its joins, as in Revit: the walls with an end on it (at a corner or a T-junction) stretch along their own line to it, their doors and windows staying put, unless Disjoin is ticked. Align (AL): click the reference line, then the line to bring onto it: a wall's face (or its centre line, with Prefer: Wall centerlines) moves square to itself onto a parallel reference, its joined walls following; a door's or window's jamb slides along its wall; a grid line is picked in any level's plan, as the reference (a wall's face onto a grid) or as the line to move (a grid onto a wall's face, moving square to itself); Multiple Alignment keeps the reference. Rotate (RO): the centre, then a start and an end ray (15° snaps), or type the angle. Mirror - Draw Axis (DM): two points; Copy is on by default, as in Revit. Trim/Extend to Corner (TR): click the part of each wall to keep; both run to where they meet, their openings staying put. Offset (OF): set the distance in the Options Bar, then click a wall's face: it is copied that far that way (Copy, on as in Revit, copies the wall alone) or moved, its joined walls following; the tool stays on. Split Element (SL): click a wall, sweep or gutter where to cut it; the part past the cut is an element of its own, with the doors, windows and gutter outlets standing in it, and elements cut or capped by it are cut or capped by both parts; a door standing across the cut is refused. Delete Inner Segment takes two clicks and removes the part between them with what stands in it. Array (AR): Number counts the members, the selection the first; click the start and end point, the end being the second member (Move To: 2nd) or the last (Last). Each member is a plain copy: Tetragon has no groups, so Revit's Group and Associate isn't offered. Selection Box (BX, Modify › View): crop the 3D view in front to a box 300 mm clear of the selected elements, as Revit does; from a plan, section or elevation it crops the model's {3D}. The box's edges show in grey; it stays through every edit, and Section Box Off (beside it) takes it off. Revit's grips to resize the box aren't there yet. Match Type Properties (MA, Modify › Clipboard): click the element whose type to match, then each element to give it that type, as the Type Selector does (its type values and family; each keeps its own placement and joins); Esc to pick another, Esc again to finish. Elements of another category, and stairs, are refused. Repeat Last Command (RC). Copy to Clipboard (Ctrl+C) and Paste ▸ Aligned to Selected Levels (Modify tab, Clipboard panel), as in Revit: pick levels in Select Levels and the clipboard's elements (all of one level) stand in the same place on each, in one edit that one Undo takes back. A door or window copied without its wall goes into the wall standing in its wall's place there, the same way round; a join to a wall left behind goes to the wall in its place; what already stands there is not pasted twice, and what can't be placed is listed (placing.pasted_to_levels). Paste (Ctrl+V, Paste from Clipboard, the split button's click) shows the clipboard's elements as outlines under the cursor, the middle of their extent at it, and a click places copies there on the view's level (the Options Bar's), in one edit; on another level a door or window copied without its wall goes into the wall standing where its wall would go (placing.pasted_at). Paste ▸ Aligned to Current View puts them in the same place on the level of the floor plan in front, and Aligned to Picked Level on the level whose line you click in a section or elevation (the Options Bar names it under the cursor). Revit's Aligned to Same Place and to Selected Views aren't there yet. Mirrored walls are reversed so their outside stays out, their doors and windows re-measured and doors changing hand.

Families. Edit Family (Modify › Mode) opens Revit's Family Editor on the selected instance's family: its type parameters beside a live preview (Studio's). Load into Project saves the family as a new revision in the saved library (save-family, revision-checked) and moves its instances in this project to it, keeping what each instance overrides (update-family-instances, whose --dry-run now also returns the records it would save). A built-in family changes only with Tetragon: Save As New Family saves one built on it, and the selected instance takes it. Walls, floors and roofs are system families: their types change in Type Properties.

Temporary dimensions. Select one wall, door or window and Revit's temporary dimensions show: a wall's from its centre line to the nearest parallel walls on each side, a door's or window's from the centre lines of the walls beside it to its own. Click a number, type a new one and press Enter: the element moves there (a wall's joined walls follow), saved like any edit; Esc leaves it.

Annotate. Aligned Dimension (DI): two points. Text (TX): a point and the note. Tag by Category (TG): click an element for its mark, or its type's name. Both are saved with the view's drawing (tetragon apply now takes drawings and storeys), shown in the view and drawn on its sheet by the next build; an outline sheet refuses them until its Detail is architectural.

While the Tetragon workbench is active, Revit's default keyboard shortcuts work: type the two letters one after the other. KS lists them as FreeCAD has them bound, with Customize… to change them.

Keys

Command

Keys

Command

WA

Wall

EH / EU

Hide / Unhide in View: Elements

DR

Door

VV

Visibility/Graphics (model categories)

WN

Window

PP

Properties

MV / CO

Move / Copy

DI / TX

Aligned Dimension / Text

RO / DM

Rotate / Mirror - Draw Axis

TG

Tag by Category

CM

Component

TR / RC

Trim/Extend to Corner / Repeat Last Command

LL / GR

Level / Grid

AL

Align

OF / SL

Offset / Split Element

AR

Array

MD

Modify (end the tool)

SA

Select All Instances (same family, or same type)

ZF / ZA

Zoom to Fit / All to Fit

WF / HL / SD

Wireframe / Hidden Line / Shaded

ZR / ZO

Zoom in Region / Out (2x)

KS

Keyboard Shortcuts

HH / HI

Temporary Hide / Isolate Element

Ctrl+O

Open

HC / IC

Temporary Hide / Isolate Category

Ctrl+Z / Ctrl+Y

Undo / Redo

HR

Reset Temporary Hide/Isolate

Del

Delete

RM

Room

Ctrl+C

Copy to Clipboard

Ctrl+V

Paste from Clipboard

Shaded is FreeCAD's "as is" for Tetragon's elements (their edges over their colours); FreeCAD's hidden-line style draws every surface's mesh, so views open shaded. In the Tetragon workbench these keys win over FreeCAD's commands that share them (among them BIM's Wall, Window, Component and Space, Draft's Move, Rotate and Dimension, and FreeCAD's Undo, Copy, Paste, Open and tree selection): the workbench gives its commands a priority of 100 in Shortcut/Priorities, the list FreeCAD's Customize dialog edits, unless you have set one there.

GUI QA: scripts/freecad-macos --launch scripts/verify_live.FCMacro drives a real FreeCAD window through all of this (see that file for its environment variables; it needs a scratch workspace). Its building is one section of a Copenhagen-style apartment block (scripts/qa_block.py): four storeys and a roof storey with dormers, a stairwell between two flats a floor, courtyard balconies and a bike shed. The QA's tools finish its ground floor as a user would: the kitchen and bath walls, a window and doors, both flats' floors, the stair, a pantry, the kitchen opened to the living room, the shed's roof, gutter and windows, and a first-floor balcony. The run takes about 15 minutes and needs FreeCAD in front: typed shortcuts reach only the active window.

Site data, outlines and Skråfoto views

CLI

MCP

Output

tetragon site <dar_id> [--radius 60]

site_overview

Address, BBR summary, maps, outlines (address building flagged), Skråfoto list

tetragon skraafoto-view <collection> <item_id> --easting E --northing N [--height H] [--size-m 60]

view_skraafoto

Building-centred JPEG

tetragon outline-project <dar_id> <project_id> --name NAME

create_project_from_outline

New estimated project

Images are written to <workspace>/.cache/studio/.

  • Outlines come from GeoDanmark (geodkv_v001:bygning_current) through the Datafordeler WFS. They are measured on the roof, not the wall faces.

  • Skråfoto images: Dataforsyningen's thumbnail service no longer responds (HTTP 404, 2026-11-18). Tetragon reads only the required JPEG tiles of the official cloud-optimised GeoTIFFs by HTTP range requests. Header, tile and byte limits apply. Previews (import_skraafoto_preview) use the same reader.

  • Pillow is a runtime dependency for that decoding.

  • Request logging: httpx request logging is kept at WARNING in every process that imports the providers, because Datafordeler keys travel in the query string.

Native dimension properties recompute the model; changing window width updates its wall cut. For validated project changes and exports, edit through MCP or project JSON and rebuild. Manual FreeCAD edits do not write back to project.json; the embedded project snapshot is not a live round-trip contract. Keep the addon installed for parametric restoration.

Secure API keys

Use hidden terminal prompts:

uv run tetragon configure-key datafordeler
uv run tetragon configure-key dataforsyningen

They store owner-readable files (0600) under ~/.config/tetragon/, outside the repository. Input is refused if a terminal cannot hide it. A trusted application's secure secret prompt can deliver a private file for configure-key <provider> --from-file <private-file>; delete that temporary file afterwards. Keys are never MCP arguments or command-line values. Do not paste them into chat, project JSON, URLs or client configurations.

Both keys are already configured privately on this machine and were used successfully. doctor checks presence and permissions only; “not yet tested” is not a live connectivity result. Datafordeler needs DAR/BBR access; Dataforsyningen needs the requested map and Skråfoto services.

For managed environments, inject TETRAGON_DATAFORDELER_API_KEY / TETRAGON_DATAFORSYNINGEN_TOKEN through a host secret store. These override key files. TETRAGON_CREDENTIALS_DIR changes the private directory. Keys are excluded from the FreeCAD worker environment. Local files are plaintext protected by filesystem permissions, not OS Keychain encryption.

Requests use fixed HTTPS endpoints, bounded responses and disabled redirects/proxy inheritance. Errors omit credential-bearing URLs; payloads redact secrets and token query parameters.

Connect MCP

The ready-to-add local .tetragon/mcp.json contains absolute executable/workspace paths and the permitted source directories, with no keys. Add its tetragon entry to your MCP client and start/reload the client. Existing client settings have not been changed.

Generate another configuration:

uv run tetragon --workspace /absolute/workspace --source-root /absolute/plans mcp-config

Transport: stdio, using the project environment's Python and tetragon.server. Tools:

  • tetragon_status, list_projects, create_project, inspect_project

  • apply_building_changes, check_building_layout, build_project, restore_revision

  • get_building_schedule, get_opening_schedule, set_opening_sill_heights, create_view_sheets, apply_drawing_annotations

  • list_families, instantiate_family, save_family

  • get_family, get_family_schema, check_family_instance, family_history, restore_family_revision

  • save_family_from_element, place_family_instances, link_family_instances, update_family_instances, get_family_usage, find_repeated_elements

  • import_reference, calibrate_reference, trace_plan_points

  • search_addresses, bind_site_address, fetch_building_record, collect_site_context, search_skraafoto

Read tetragon://schema/project-v1 before editing. Existing project/family writes require the current expected_revision. Batches are atomic; removing a wall requires removing its hosted openings too. instantiate_family returns parameters; apply_building_changes validates and persists them. The reconstruct_building(address) prompt supplies a source-first workflow.

Family and drawing parameters

Use list_families / instantiate_family, then persist the returned parameters with apply_building_changes, or place and save in one step with place_family_instances. The masonry presets are monolithic: thickness does not imply an invented cavity/layer buildup.

The saved family library

Custom families live in <workspace>/_families/ and serve every project in the workspace. They are data, never code, and every revision is kept (family_history, restore_family_revision).

  • Type and instance. A family holds type parameters; placement (host, offset, sill, origin, path, wall ends), joins (trims, caps, gutter outlets, railing openings) and identity stay with each instance. An instance of a custom family records the family_revision it follows. A value that differs from that revision is the instance's override.

  • Variants. extends builds on a preset or another custom family of the same kind, so a variant stores only what it changes. Saving pins the parent's current revision. Saving a family re-pins the families built on it as new revisions of their own, so a revision always resolves to one set of parameters.

  • Reuse loop. find_repeated_elements groups elements that share a type, in one project or across the workspace, and names the families each group already matches. ignore_parameters (such as width_mm) leaves sizes to the instances. Save a group once with save_family_from_element (or save_family with its suggested_parameters), then link_family_instances; geometry does not change, and differences are reported as overrides.

  • Placing. place_family_instances places several instances in one revision-checked batch. An opening takes exactly one of offset_mm, centre_mm (its centre from the wall start) or at ([x, y] on the wall, projected onto the centre line).

  • Editing. After saving a new revision, update_family_instances (try dry_run first) moves instances to it: a value still equal to the old revision follows the family, and an override stays. Presets change only with Tetragon and have no revisions. get_family_usage counts instances per project that are current, behind or unlinked.

  • Records without these links serialise exactly as before: family_revision, extends, extends_revision, description, tags and saved_at are written only when set.

  • Walls: role: "exterior" | "interior", grid_angle_deg for each wing. Interior baselines must be parallel/perpendicular to that grid; builds reject walls intersecting another host’s opening.

  • Roof-following walls: cap_by: [roof IDs] (roof or sweep elements) removes everything above each listed roof's underside, so a loft partition or knee wall meets the slope with neither gap nor overlap. Give the wall a height that reaches the roof; the cap does the rest, and a cap that removes the whole wall is an error. The roofs' solids and their swept faces are cut one at a time; a wall left standing above its roofs (a fin where two facets' tools only touch, or a gap between facets) fails the build, naming the wall. Use it in place of roof-following partition sweeps, so the loft walls stay walls in plans, the room audit and IFC. Empty (the default) keeps the flat top.

  • Windows: columns, rows, left-to-right column_ratios, bottom-to-top row_ratios, sash_mm, and recess_mm measured inward from the wall-local exterior face (−Y). Ratios divide clear frame bays after the main posts/transoms; absent or empty ratios retain equal divisions.

  • Doors: door_type: "glazed", leaves: 1 | 2, hinge: "left" | "right", swing: "out" | "in". The three new balcony-door presets default outward; the existing generic door keeps its original inward default. Both directions remain available. Drawings place the hinge at the modeled recess and show the swing; 3D leaves are modeled closed.

  • Fag and glazing divisions are explicit: windows use columns, rows, row_ratios, mullion_mm and sash_mm. Glazed doors can add one fixed panel with sidelight_width_mm and sidelight_side: "left" | "right"; two opening leaves plus one fixed panel form a three-fag unit. Sidelight width includes its frame inside the outer door frame. It defaults to 0, preserving existing geometry. Native SidelightWidth is editable; plan swings cover only opening leaves. A transom_height_mm can align the upper lights across the unit. Main posts/transoms remain distinct from optional applied glazing_bars; neither is a certified supplier profile.

  • Balconies: width_mm, projection_mm, railing_height_mm, railing_style, deck_material, board_mm, board_gap_mm and max_clear_gap_mm. Styles are frederiksberg, norrebro, vesterbro, osterbro.

  • Concrete balconies: construction: "concrete" (default "steel") builds one solid slab frame_height_mm thick over the whole outline, splayed or square, its top the deck. deck_material names its concrete and material the railing, which stands on the slab; there is no frame, board or soffit, and a hardwood handrail or UPE frame is rejected. Renders and drawings colour the slab as concrete and the railing in the element's display_color; IFC associates a constituent set (slab, railing). The danish-concrete-balcony-norrebro preset is a 160 mm slab with the Nørrebro railing (30 × 6 balusters under one 60 × 15 flat, no posts) in black powder-coated steel, cantilevered; its product.note lists what is assumed.

  • Balcony undersides: soffit_mm (default 0, open underside) and soffit_fall_percent (default 0) add a white panel inside the frame. Thickness is measured normal to the panel; its front lower face is flush with the frame bottom and its rear rises by the clear panel depth times the gradient. Invalid frame/deck clearances are rejected. These are editable native SoffitThickness and SoffitFallPercent properties. continuous_railing: true gives Nørrebro a continuous top rail with flat balusters and no square posts; the legacy railing remains the default.

  • Handrail (håndliste): handrail_width_mm (default 0, none) and handrail_height_mm (default 45) put a hardwood handrail, e.g. cumaru 70 × 45, on top of the railing. It runs along each railing segment, mitred at the deck corners and square at railing openings. Its top is at railing_height_mm, and the steel rail, balusters and posts stop under it. It renders with the deck timber material. Widths under 30 mm are rejected.

  • Splayed sides: left_splay_mm / right_splay_mm (default 0) move a side out along the facade, and left_splay_depth_mm / right_splay_depth_mm set how far from the facade the splay runs (default 0 = the whole projection). From there the side runs straight to the front. A positive splay lets a balcony follow an angled wall, e.g. 965/965 beside a 45° stair-tower wall on a 1300 mm projection. A negative splay cuts it back towards the front along a straight line, e.g. a neighbouring wall's face extended; the front edge must stay at least 600 mm. left_splay_start_mm / right_splay_start_mm (default 0) keep the side square up to that depth before the splay begins, so a cut can follow a line that crosses the side partway out. left_railing / right_railing (default true) can be set false where a wall closes that side: the side gets no railing and the front run ends free at the corner. On such a side, left_railing_reach_mm / right_railing_reach_mm (0–300) carry the front run on past the deck edge, so its end post and handrail meet a wall that stands further out than the deck. The frame becomes a channel ring mitred at every corner, deck boards and soffit are clipped to the opening, the railing follows the outline 20 mm inside it, and the plan width dimension measures the longer front edge. Railing openings on a splayed side are rejected. Without splays a balcony is built exactly as before.

  • Frederiksberg detail: baluster_profile: "square" (16 mm bars instead of 12 mm round), post_mm (default 40) and handrail_gap_mm (default 0). With a gap, the steel top rail and balusters stop that far below the handrail and only the posts reach up to carry it, as on a client's Frederiksberg courtyard railing.

  • Balcony product detail (all opt-in; the defaults build exactly as before):

    • frame_profile: "upe160" builds the frame as a true UPE 160 (160 × 70, web 5.5, parallel flanges 9.5, root radius 12), mitred at every corner, splayed outlines included. The deck stays recessed inside it, flush with its top. The rear member is cut down by the deck's thickness, so the innermost board, fitted to the masonry, runs over it to the facade with no steel edge along the wall. Only a 160 × 70 frame can be a UPE 160. With it, the steel flats are mitred where railing runs meet, and on an oblique run they start past the square post's corner.

    • bottom_rail_mm (default 80) sets the lower flat's underside above the deck (Frederiksberg and Vesterbro), or the baluster foot on other styles with posts. handrail_radius_mm (default 0) rounds the håndliste's top edges (profiles.handrail). continuous_railing now also allows Østerbro: balusters on the frame, tied by a 40 × 10 flat under the håndliste.

    • mounting: "none" (default, no fixings modelled), "long_tension_rod", "short_tension_rod", "cantilever" or "bracket". A tension rod (trækstang) is a Ø20 bar 40 mm outside each end of the frame. It runs from a lug at the frame's front corner to a 60 × 200 × 15 mm wall plate whose pin is 2400 mm above the deck (long) or railing height − 150 (short); tension_rod_rise_mm overrides that. "cantilever" (indspænding i murværk) is concealed in the masonry and adds no geometry. "bracket" (hyldeknægt) puts a wall plate, leg and 40 mm strut under each end; an "omvendt hyldeknægt indmuret" is built into the wall, so model it as "cantilever". A splayed or walled end gets no rod or bracket, and a splayed one is reported.

    • The build's warnings (Project.quality_notes, via balcony_documentation.fixing_conflicts) report a rod or bracket wall plate that lands within 100 mm of a window, door or head arch, on any storey, or that no wall face backs completely.

    • Privacy screen (indbliksværn): screen_side ("none", "left", "right", "both"), screen_height_mm (default 1800, the top above the deck) and screen_material (frosted laminated glass by default; it renders and draws with the frosted role). Each side gets a 10 mm panel 10 mm clear of everything on that side (frame, flats, posts, håndliste, rod), from 10 mm off the facade to the front edge, and from the frame's underside to the screen height, with two clamps to the frame's end and two to the facade. A screen needs a railed, square side, and a rod's wall plate on the same side must clear its top by 10 mm (so short rods and screens do not mix). This replaces case screens modelled as separate sweeps.

    • Render roles: steel fixings and clamps are metal, the fitted board deck, the screens frosted (glass if the material is not frosted). They are the last solids before the soffit.

    • Balcony detail sheets list the railing members, the fixing and the screen. The soffit section uses 1:20 when rods, brackets or a screen make the balcony taller than about 1.7 m, and the side sheet looks at the end without a screen.

  • Stair access: optional railing_openings entries have edge: "left" | "front" | "right", offset_mm and width_mm. Offsets follow the railing perimeter from its first post centre: left rear-to-front, front left-to-right, right front-to-rear. The post centres are 20 mm inward from deck corners. An opening of 940 mm between 40 mm post centres leaves 900 mm clear. Overlapping/out-of-range openings and retained segments shorter than 80 mm are rejected. The default remains a closed railing.

  • Floors: layers are ordered bottom to top and must sum to slab thickness. Storeys distinguish elevation_mm, finished_floor_offset_mm and clear_height_mm; parameter_evidence records the source of each critical value. get_building_schedule reports absolute and relative opening/floor levels and unresolved values.

  • Roofs: roof_type: "gable" | "hip" | "mono" | "flat" on a rotated rectangular footprint. Hip roofs have four slopes, plumb eave edges and constant thickness measured normal to each slope; they require a positive pitch. Automatic eaves details remain limited to gable roofs. Roof dimensions and bearing levels need source evidence.

  • External sills: optional external_sill defines projection, thickness, slope, side overhang and bearing depth; the host receives a matching pocket. Existing simple sill defaults are preserved. A brick-on-edge sill (rulleskifte) is an external_sill with a brick material, e.g. {"projection_mm": 50, "thickness_mm": 108, "slope_deg": 15, "side_overhang_mm": 0, "material": "Brick on edge sill (rulleskifte)", "display_color": "#8f3f2a"}: it takes the brick role in renders and brick courses in elevations, in its own display_color or else the facade's brick. Without a material the sill stays stone grey.

  • Brick heads (stik): optional head_arch on windows and doors, default none (geometry unchanged). rise_mm is the intrados rise at mid-span (0 is a flat arch, cut square); height_mm the band depth (228 is one brick on end); extension_mm how far it runs past each jamb, where a segmental arch is cut radially; proud_mm its projection from the exterior face (0 is flush); depth_mm (default 108) how far it is set into the wall, which gives up a matching pocket; material and display_color. Elevations draw it in its own colour (or the facade's brick), and renders give it the brick role and colour; plans omit it, as it sits above the cut. Its bricks stand on end, so its joints are radial, not courses: an odd number of equal bricks about 66 mm apart at mid-radius (54 mm brick, 12 mm joint), with a key brick at the crown, on its front face only (opening_layout.head_arch_bricks). A flat arch is a soldier course (standerskifte) with upright joints at the same pitch and a brick on the centre line. Renders map the arch's own UVs (u along the arch, v across it) onto the brick texture turned on end; a scanned brick pack keeps its horizontal courses on the arch. A rendered stik has no joints. It must stay within its wall and clear other openings (checked on load). It may run past its wall's end only where another wall joins that end at its height. At a corner, where the band runs into a wall joined at its host's end, the build trims it to that wall, as a stik dies into the corner; the opening's arch and the host's pocket are trimmed alike. The build refuses a corner that would cut the arch over the opening, between its jambs, and an arch left standing past the corner. It also refuses any clash with a balcony, band, pipe or a wall not joined at that end. Each refusal names both elements. FCStd files saved before corner trimming have no HostNeighbours and keep their whole arches. get_building_schedule and get_opening_schedule list an opening's stik as head_arch, with head_arch_note such as "Stik: segmental, rise 120 mm; sill: Brick on edge sill (rulleskifte)"; rows of openings without one are unchanged. The dk-two-fag-stik family is a Copenhagen two-fag window with top lights, a segmental stik and a rulleskifte sill.

  • Plinth cornice (sokkelgesims): a straight cornice band with the plinth profile, fitted to the wall's exterior face with fit_band (MCP fit_facade_band), with a brick material and a display_color. A brick cornice takes the brick role in renders. End it short of doors: a band is not trimmed around openings.

  • Stairs: kind: "stair", straight closed timber runs joined by landings, as Revit's Stair is drawn run by run. runs (each origin, the left corner of its first riser, rotation_deg, risers 2–30 and base_mm), landings (one between each two runs: outline, top_mm at the top of its run), width_mm 600–1800, going_mm 220–360, riser_mm 100–220 and landing_thickness_mm. It builds as one IfcStair whose treads, risers, side stringers and landings are its solids (tetragon.stair_details.stair_parts, the same flights as MCP's propose_closed_stair_flight); architectural plans draw it as Revit does (treads below the cut, one break line where the cut crosses it, dashes above, the walk line with its arrow and UP), and so do the plans of the level it climbs to (its part above the lower cut, seen from above, the break and the walk line down with DN; stair_arrival, stairs_arriving), in the build's drawings and the workbench's live views alike; sections cut it, renders give it timber. Design geometry, not a structural or regulatory stair design; the opening in the floor above is modelled separately.

  • Sheets of several views: sheets (left out of a project when empty, so other projects' files are unchanged), each with number (unique among sheets and the views' own sheet_numbers), name, paper and views (drawing, and x_mm/y_mm, where the view's centre stands on the paper from its top left). A build writes each as sheet-<id>.svg and .pdf (tetragon.sheet_composition): every view is its own sheet's content, without that sheet's border and title block, cropped to the area it inks and moved into place, its styles scoped to it, with Revit's view title (number, name, scale) under it and the sheet's own title block. The views' own sheets and drawing-set.pdf are byte for byte as before. tetragon apply takes sheets and remove_sheets.

  • Grid lines (Revit's Grid): grids (left out of a project when empty), each with id, name (unique, up to 10 characters), start and end (plan points at least 100 mm apart). Architectural plans (not site plans) draw every grid from start to end, dash-dotted, with its bubble and name beyond the end; sections and elevations draw the grids within 15° of square to them where they cross them, from a metre below the model to a metre above it; presentation and axonometric drawings draw none (tetragon.grids). Their ends widen a drawing's extents. tetragon apply takes grids and remove_grids.

  • Room separation lines (Revit's Room Separator): room_separators (left out of a project when empty), each with id, storey and start and end (plan points at least 10 mm apart). They build nothing. The room audit (tetragon.room_audit) cuts each from its level's plan as a 0.2 mm strip, 0.2 mm past each end so a line drawn to a wall's face still closes, and puts the regions' corners back onto its line, so the rooms either side meet there; a strip standing free inside a region leaves no hole, one ending free leaves no slot. Architectural plans of their level draw them as thin solid lines, styled on the line so sheets without them are unchanged; presentation plans, site and roof plans draw none. tetragon apply takes room_separators and remove_room_separators.

  • Rooms: name/storey/outline polygons, optional label_position and opt-in stair_well in rooms. Sheets: detail: "architectural", paper: "A4" | "A3" | "A2" | "A1", scale, and optional element_ids for a detail selection.

Every branded preset carries product metadata separating published dimensions from assumptions. IdealCombi Futura+ uses the published 53 mm sightline/38 mm fixed frame; UnikFunkis TAP48 uses a published 128 mm depth. Vrögum’s source was inaccessible and its families are explicitly concepts. The four Danish steel balcony presets (danish-steel-balcony-frederiksberg, -norrebro, -vesterbro and -osterbro) build a Danish steel balcony maker's published construction: a UPE 160 frame with the deck recessed in it and the innermost board fitted to the masonry; Frederiksberg's Ø12 balusters between two 50 × 10 flats; Nørrebro's 30 × 6 balusters under one 60 × 15 flat; Vesterbro's 30 × 6 balusters between two 50 × 10 flats; Østerbro's 30 × 6 balusters; a cumaru håndliste; and a 3 mm iBOND underside. No fixing is modelled by default: mounting adds tension rods, a concealed cantilever or brackets, and screen_side a frosted screen. Each preset's product.note lists what is assumed: 25 mm posts, the lower flat 25 mm above the deck and an 80 mm gap under the håndliste (Frederiksberg and Vesterbro, from the maker's renders and photos), Østerbro's 40 × 10 tie flat, a 89 mm maximum gap, the håndliste's 70 × 45 section and 8 mm radius, and every rod, lug, plate and clamp size. Anchorage, rod sizes, loads and fabrication connections are not designed. These are not certified supplier models. Balconies export as an IFC building-element proxy assembly, not separately scheduled railing/deck members. The preset ids these replace remain as deprecated aliases (tetragon.families.DEPRECATED_ALIASES): they warn, are not listed, and build exactly the element they built before, product record included, so existing projects and scripts are unchanged.

The maker publishes a 3 mm light-coloured iBOND underside falling toward the front, without a gradient. The inspired presets use white and a provisional 1:100 fall, not a manufacturer-specified gradient. Over a nominal 1300 mm projection this is 13 mm; a panel between 70 mm frame flanges spans 1160 mm and therefore rises 11.6 mm. Enabling the panel adds a separate 1:10 section to generated balcony detail sheets (1:20 when rods, brackets or a screen make the balcony too tall for A3 at 1:10). No fire classification or fixing design is inferred from the product page.

Sources: IdealCombi Futura+, Frame IC, UnikFunkis TAP48, Vrögum. The steel balcony presets name no maker and carry no product links.

Native sheets, PDFs and annotation rules

create_view_sheets creates a site view, one plan per storey, four local-axis facades and two sections. apply_building_changes edits those definitions; apply_drawing_annotations upserts/removes individual annotations with revision checks. build_project accepts pdf, or use:

uv run tetragon --workspace .tetragon build drawing-study --formats fcstd step svg pdf ifc

Opening chains on technical plans sit 10 mm outside each wall's own face and what stands against it within its length: its openings, any balcony or stair part starting within 1 m of the face, and the stair parts and screens hanging off those, up to 6 m out. Collinear segments of one facade share the furthest reach, so their chains stay aligned. Measured to the plan's far edge, as before, an inner court wall's or an oblique wall's extension lines crossed the court or the sheet. The overall dimensions keep their own outer chain.

Plan wall cuts follow the convention of a client's reference plans. Exterior walls (and walls with an unspecified role) form one hatched cut, as before. Interior walls form a second, solid grey cut without hatch, fused so partitions meet each other without seams, and cut back by the envelope so they butt against its inner face, as the model's junction ownership does. The sales views' --light-plans style turns the envelope white with its hatch and keeps partitions light grey. Room names keep their centre and 3 mm size where they fit. In a narrow room they move to the nearest row where they fit whole, or shrink (to 1.6 mm at least), so their white backing stays off the walls; an explicit label_position is kept.

Presentation plans draw a window as a light symbol, as V1 does: a 0.13 mm frame and a 0.09 mm glass line in the reveal, with the sill and window-board lines across it (class="cut" with data-role="window-frame"/"window-glass", and window-sill). --light-plans keeps those weights; technical plans keep the plain window cut. Stair wells are opt-in, never guessed from a room's name: set "stair_well": true on the room. Where no stair flight (a sweep on that storey) lies inside it, the plan fills it with a light dotted hatch (class="stair-hatch"); modelled flights are drawn instead.

Material façades and roof plans. Each storey and wall segment is its own solid, so faces of one fill meet in one plane all over a facade. An edge, or the part of one, shared with a coplanar face of the same fill is not stroked (seam_free_edges); silhouettes, creases, colour and material changes (a plinth) and opening reveals keep their line. Such a face draws its fill with a same-coloured stroke and its remaining edges as a surface-edge path. Gutters and downpipes default to light galvanised zinc (#a8aeb1, as does any zinc material) with a thin, lighter outline; an explicit display_color still wins. A roof plan (plan_mode: "roof") shades each facet by its normal against a fixed light from the south-west, so slopes read apart; flat roofs, decks and balconies keep their colour, and ridges, hips and valleys are 0.18 mm lines, lighter than a dark fill. Faces are painted in depth order (depth_order): each face is rasterised at 4 px per paper mm with its depth along the view, and a face hidden somewhere by another paints before it; the nearest-point key only orders faces that never hide each other, so a slope's proud eave can no longer paint it over a gable in front of the rest of the slope. Two planar faces that cross, each hiding at least 1 mm² of paper of the other (a gable through a slope, a dormer roof through the main roof), are cut along the line where their planes meet, and the pieces are ordered on their own. The cut is not stroked, and brick and tile courses run on across it. Curved faces, glass, head-arch (stik) faces and faces large enough to have their courses coarsened are never cut. Smaller overlaps, pairs where neither face may be cut, and longer cycles keep the larger visible overlap. Two plane depths count as equal within 1.5 mm (above the millimetre trims models carry, below 2 mm relief), tessellated ones within 2 mm. A face thinner than a pixel (a 2 mm rustication joint at 1:150) is sampled along its outline at its own depth. It paints after each face it stands in front of at more of its samples than it lies behind it, counting behind only well inside that face; one that is mostly behind a face sorts just under it instead. It is never made a face's predecessor, so no other face waits on it.

Reissuing technical sheets without a rebuild. A build's sheets are drawn when it is built, so a later drawing fix (or a new issue) used to need a full rebuild. scripts/export_technical_sheets.py BUILD_REPORT OUTPUT [--revision-label P06] [--issue-date 2026-11-18], run with FreeCAD's Python, checks the build's persisted shapes and project snapshot against its report and draws every sheet again outside the build, exactly as the worker draws it: one SVG and PDF per sheet plus drawing-set.pdf. The two options change only the title-block issue; the printed model revision stays the build's. manifest.json records the build ID, the project and FCStd hashes, a hash of the drawing code, and per sheet the new SVG hash beside the build's own (equal when the code and issue are unchanged). Sheets with a registered source overlay are refused, because their source plan is staged from the workspace only at build time.

The FCStd contains real TechDraw::DrawPage objects and linked DrawViewSymbolPython views. Editing source dimensions regenerates the view geometry; ViewScale and CutPosition are editable native properties. The template is embedded as FreeCAD's PageResult, so the model is portable even though its informational Template field retains the original build path. The addon must remain available for Python view recomputation. Plan/façade/section PDFs are vector output, including hatches and text outlines, with one file per sheet plus drawing-set.pdf; outlined text is not searchable text. Axonometric sheets embed a model rendering; their frames/text remain vector.

Pass presentation: {} to create_view_sheets for a separate set of presentation IDs plus an axonometric model view. Existing technical sheets are retained. Custom options are wall_color, roof_color, joinery_color, glass_color, accent_color (six-digit hex colours), surface_patterns, show_dimensions, show_opening_tags and show_levels. On individual drawing definitions, presentation: null preserves the existing technical style. Presentation defaults omit automatic dimension chains/tags/levels; explicit annotations remain available. Axonometric drawings require kind: "axonometric", axis: "z", architectural detail and a presentation style. Their image is a model view, not a measured drawing scale.

Material façades clip vector surface patterns around real model openings. Axonometric views tessellate native solids and use a depth buffer so internal walls cannot paint over a roof; this uses NumPy already bundled with the verified FreeCAD runtime. These are illustrated CAD views. Cycles rendering and registered original-plan underlays are described below. Multi-view sheet composition and automatic furniture/sanitary symbols are not implemented.

Annotation points use local model millimetres or paper millimetres as specified by space. offset_mm is always paper-space label/dimension spacing. Paper annotations cannot be passed off as measured model distances. Sheet metadata includes sheet_number, revision_label, issue_date, drawn_by and status.

  • boundary_type: "parcel" is accepted only on kind: "site" drawings. Cadastral geometry is never automatically copied onto floor-level views.

  • boundary_type: "party_wall" requires host_wall_id pointing to a wall explicitly marked party_wall: true; its points must lie on that wall. This denotes a dwelling separation, the interior enclosure between a stairwell and dwellings, or a gable adjoining another property/brandmur. Ordinary internal room partitions are not marked. adjacent_property can identify the adjoining property. A marker is not a fire-resistance certification.

  • Both boundary types use pale-red dash-dot hairlines (0.13 mm), separate labels and independent evidence. In an elevation a party line stops at the viewer-facing windows and doors of its facade and of anything standing in front of it, such as a stair tower; openings in a facade further back do not break it. Undocumented positions are marked provisional.

  • show_sill_heights adds BK values above finished floor; an asterisk means the sill parameter lacks documented/measured evidence. Street/address text on the historical sheets identifies the project, not an inferred entrance position.

Unequal fag widths, independent sprosser patterns, double panel doors and the read-only opening schedule are documented in Danish joinery layouts, with seven generic presets and a reproducible native/PDF showcase.

From address to building

  1. Search the case-sensitive prefix and select an exact DAR entrance ID. Binding records the entrance point, BBR and parcel IDs. The entrance is not a surveyed building corner.

  2. Collect registry, map and Skråfoto catalogue snapshots. Registry area definitions remain separate facts, not inferred wall lengths.

  3. Import original plans and current images. Files are copied and hashed; originals remain untouched.

  4. Calibrate a specific plan page using two points and a known distance. Specify pixels or PDF points. Tracing flips page-down Y to model-up Y. Perspective photographs require rectification before a single scale is meaningful.

  5. Establish local axes, orientation, levels, wall centre lines/layers and openings. Retain documented, measured, estimated or design evidence and uncertainty. Documented/measured geometry requires references.

  6. Build and inspect bounds, quantities and discrepancies before issuing drawings. Establish the vertical datum and orientation before treating map conversion as surveyed.

Modeling contract and limits

schema_version: 1, units: "mm", right-handed local coordinates, Z up. Wall baselines are centre lines. Opening offset runs from host start; sill is relative to wall base. Element elevations are storey-relative; drawing planes are absolute local millimetres. GIS origin remains metres. north_angle_deg is clockwise from local +Y to grid north; local +X maps to (cos(angle), sin(angle)) in easting/northing.

Unknown fields, nonfinite project values, invalid polygons/hosts, overlapping openings and inconsistent layers are rejected. OCC checks each element for valid positive-volume solids. Wall-join audits reject material overlap above 1 mm³ and disconnected nominally supported ends above 0.00001 mm; these are numerical geometry tolerances, not survey accuracy. Free partition ends produce layout warnings. General clashes, structural design and regulatory compliance are not checked.

  • No automatic photogrammetry, OCR-to-BIM or full-resolution Skråfoto download. Catalogue asset links are returned; local images can be imported.

  • Roofs use rectangular footprints. Families are parameter templates, not RFA files or manufacturer-certified assemblies. Hardware, operable sash mechanics, curved walls, roof junctions, stairs and MEP are not dedicated generators.

  • Architectural annotation is opt-in (detail: "architectural"); the existing outline sheets retain their defaults. Room areas come from supplied polygons, not automated room detection. Stairs, reinforcement, assemblies/connection details and complete construction schedules are not generated. SVG/PDF exports and native TechDraw pages use the same view renderer. The native page contains a model-linked custom SVG view, not individual draggable TechDraw dimension objects. Rebuild external exports after changing the native model. DXF export is not implemented.

  • Wall joins use centre-line endpoints and geometric intersection, not proximity snapping. Exterior walls take priority at T/crossings; equal roles use baseline length then ID. Extremely acute/short miters are rejected for explicit detailing. Multiway junctions use deterministic butt ownership. Layer thickness edits require a consistent project definition. The build's join audit runs exact distance queries only for walls whose bounding boxes lie within 1 mm of each other; results are unchanged.

  • IFC uses faceted BREP because the bundled advanced BREP serializer crashes on a minimal box. Layered material sets and receiving-application round trips are not certified. STEP carries geometry, not complete BIM metadata.

  • Build timeout: 300 seconds by default; set TETRAGON_BUILD_TIMEOUT_S (or Settings.build_timeout_s) to 60–3600 for a larger building. Large-building performance has not been benchmarked. FreeCAD exposes more capabilities than this first interface.

Development

What comes next, and why, is in docs/roadmap.md.

uv run ruff check src tests scripts freecad scripts/freecad-macos scripts/verify_gui.FCMacro
uv run ruff format --check src tests scripts freecad scripts/freecad-macos scripts/verify_gui.FCMacro
TETRAGON_FREECAD_PYTHON="$PWD/scripts/freecad-macos" uv run pytest -q
uv build
uv run pip-audit
git diff --check

Without TETRAGON_FREECAD_PYTHON, native tests are skipped, not verified. Tests include a real MCP stdio client, FreeCAD solids, placement/volume regressions, FCStd reopening/parameter changes, and independent IFC parsing/schema/mesh checks.

GUI QA: set TETRAGON_QA_BUILD_REPORT to saved build-output JSON and TETRAGON_QA_OUTPUT to an output directory, then run scripts/freecad-macos --launch scripts/verify_gui.FCMacro in a separate process. It writes result.json and model.png and closes its process.

See verification evidence. Rollback: remove only the installed Tetragon workbench symlink and MCP entry; restore project revisions through restore_revision. Sources/exports remain in the workspace. Plane tracking was explicitly deferred. The absent engineering kit was not installed or represented as a passing gate.

References: FreeCAD BIM, Datafordeler, Dataforsyningen.

Cycles rendering and registered original plans

Build mesh to export the actual FreeCAD tessellation (metres, 0.5 mm deflection) with per-element IDs and separate glazing, joinery, masonry, roof, deck and steel roles. Then render that immutable build with Blender (tested with Blender 5.2.1 LTS on Apple Metal):

tetragon build my-building --formats fcstd svg pdf ifc mesh
tetragon render my-building BUILD_ID --view garden --context garden --width 1920 --height 1200 --samples 96

The equivalent MCP tool is render_project(project_id, build_id, options). Views are garden, street, detail and axonometric; context defaults to studio. The street context adds illustrative paving, kerbs and asphalt. garden adds explicitly illustrative vegetation and ground, kept in a separate Blender collection. These are not site surveys or solar studies. Configure TETRAGON_BLENDER if Blender is not at the standard macOS location or on PATH. Renders publish atomically as PNG, editable .blend, and a revision-bound report with source/output hashes. No project code or credentials are passed to Blender; attribution URLs remain inert metadata. The existing SVG axonometric renderer remains available without Blender.

With garden or street context, --balcony-staging distributes empty, lightly furnished, bistro, bench, herb and planter arrangements across balconies at least 2.8 × 1.4 m. Balconies between 1.2 and 1.4 m deep use a smaller set of plants, herbs, minimal dressing and empty layouts. The eight-balcony study has two completely empty balconies. Per-balcony seeds keep the same arrangement across camera views; planter finishes, foliage proportions and furniture counts vary. Scene objects carry balcony IDs and staging styles, and the render report records object counts (zero for empty balconies). Furniture stays in the context collection; it does not enter CAD, IFC, schedules or dimensioned drawings. Check access against the particular balcony design; this is presentation dressing, not a furnishing plan. --white-balance-kelvin 5200 adjusts the scene's colour balance (2000–10000 K, verified in Blender 5.2). Both options are off/unset by default and are available through render_project.

Through the Python/MCP render options, frame_building: true fits the complete building while preserving vertical camera lines. frame_element_ids: [...] frames the listed elements instead (for example a balcony pair in a detail view), from the same side and azimuth; unknown IDs are rejected. Every render report now includes framing: for the building, the targets and each balcony, whether its bounding box lies fully in frame, its margin, the visible fraction and its normalised frame box. Boxes are conservative and occlusion is not evaluated. Optional material_colors maps the joinery, metal, zinc, stone, concrete and plaster roles to #RRGGBB swatches; paving tints the courtyard or street ground. Individual elements can supply display_color; glazing keeps its transparent material. These swatches are illustrative finishes, not certified product colours. Defaults remain unchanged.

Three opt-in options add realism; all are off by default, so earlier renders reproduce unchanged:

  • metal_finish: "galvanised" renders the metal role (balcony frames, railings, steel parts) as hot-dip galvanised steel: fully metallic, with spangle cells varying the roughness and dull and bright patches. A metal swatch still sets its colour. The default is "powder_coat".

  • surface_detail: true adds low-frequency mottling and a fine sand bump to rendered plaster, concrete, stone sills and zinc, gives the street context 600 × 400 concrete paving with joints and grained asphalt, and lets swatches keep a texture's detail. A swatch or display_color on a textured role, for example a slate roof, scales the texture so its mean matches the swatch instead of replacing it with a flat colour.

  • zinc_finish: "patinated" renders the zinc role (dormer cheeks and fronts, flashings, gutters) as old zinc under its matte grey carbonate patina: rough (0.7) and mostly diffuse (metallic 0.2), so faces in shade read grey instead of mirroring the sky. Weathering's patina varies the roughness about it. A swatch or display_color still sets its colour. The default is "weathered", the earlier glossier metallic zinc (roughness 0.4, metallic 0.8).

All three are illustrative appearance only; they change no geometry, drawing or schedule.

A photoreal summer look adds four more opt-in options, all off by default:

  • sun: {"time": "2026-06-24T15:00:00+02:00", "latitude_deg": 55.69, "longitude_deg": 12.55} places the sun for that local time (with its UTC offset) and place (NOAA solar position), turned into the model by the build's site.north_angle_deg; the report records sun_position. With an HDRI, its own sun is clamped out of the sky, the sky turns so its glow lies the same way (environment_rotation_deg is then ignored), and a sun lamp of the measured energy casts crisp shadows (sun_lamp_irradiance). Without one, the sky texture's sun moves there.

  • agx_look (punchy, very_high_contrast … very_low_contrast) applies an AgX look; it needs tone_mapping: "agx".

  • weathering (0–1; 0.5 is subtle) ages the existing fabric with shader nodes: grime in crevices, rain streaks under sills, cornices and slabs, a splash zone at the foot of walls, tone variation keyed to each brick's, slate's or paver's own tone and broad patches (a swatch stays the mean colour and keeps that share of a texture's hue), lichen on north-facing slates, zinc patina, dirt in paving joints and along walls, and varied rooms behind the glass (lighter or darker, warmer or cooler; no curtains or blinds). Balcony steel, decks, screens and joinery stay clean.

  • context_buildings takes neighbouring buildings as massing in model metres; tetragon.context_massing.massing(site, outlines, bounds_m, exclude_ids, walls=…) makes them from GeoDanmark outlines (building_outlines): walls to the median roof edge, a simple roof, flush on the case's party walls, the case's own buildings and parts and low sheds left out. context_windows: true gives each neighbour a muted facade colour, windows in light frames and a darker plinth. Massing that holds the camera or hides more than half of a framed balcony or framed element (sight lines in 3D, so a camera above the roofs keeps what it looks over) is cut away, shadow included, and listed in the report's context_cut_away; the report's balcony_visibility gives each framed balcony's share of clear sight lines.

More opt-in finishing options, all off by default:

  • sun_strength (default 1) scales the sun lamp (or the sky texture's sun) against the same sky.

  • saturation (0.5–2, default 1) scales colour saturation in scene light before the view transform; greys and whites stay neutral.

  • display_color_map: {"#8c8270": "#9c8660"} recolours element display colours in a render only; drawings keep the project's colours.

  • flatten_banding: true evens out a scanned brick, slate or paving map's row-to-row and column-to-column tone, so its repeat does not stripe a tall wall; each unit keeps its own tone.

  • stik_on_end: true draws head arches (stik) over a scanned brick as bricks on end with radial joints, in tones from the scan and the arch's own swatch.

  • camera_location_m and camera_target_m (model metres, together) place a perspective camera exactly, e.g. in a corner of a closed courtyard that no framing distance reaches; converging verticals aim at the target, parallel ones keep the camera level and shift the frame.

context: "street" lays its road, kerb and pavement strip 6.4, 3.06 and 0.3–2.7 m in front of the foremost facade that the balconies face. The facing direction is their mean outward direction, snapped to the nearest axis; it is −Y when there are no balconies. context: "courtyard" paves the ground without road or kerb; use it for balconies on a courtyard facade. With surface_detail the paving is jointed concrete slabs.

street_fronts (opt-in, with context: "street", up to 8) lays a street along each listed facade instead, so a corner building gets both its streets. Each front gives its facade line in model metres, line_m: [[x, y], [x, y]] (the pavement starts there), and side, "left" or "right" of the line walking from its first point to its second, where the street lies. Its cross-section runs outward from the facade: pavement_m (default 3.5) of 600 × 600 concrete slabs whose last setts_m (0.3) are granite setts by the kerb; an optional cycle_track_m of asphalt at kerb height behind a flush granite kerb; a 300 mm granite kerb 120 mm over the asphalt; then the asphalt: an optional parking_m lane each side, marked by a line, and carriageway_m (7) with a dashed centre line. symmetric (default true) repeats the near side beyond the carriageway; false ends it with a kerb. The street runs extend_m (50) past the line's ends. The pavement lies at terrain_elevation_m, the asphalt a kerb below it, the paving round the streets as before. Where two fronts meet they join at the mitre through the facade corner and the corner of their pavements: no overlapping surfaces or gaps, and the slab courses turn the corner. A cycle track and the kerbs before the asphalt end on the crossing street's kerb line, the asphalt running on into the junction, and markings stop 2 m short of the crossing street's asphalt (the junction is drawn as the two streets meeting, not as a through street). Fronts on one street line, for a cycle track that starts part way, join half way between their ends. Nothing stands above the pavement: no trees, cars, people or street furniture. A scanned paving stays on the ground round the streets; the paving swatch tints it and the slabs. Illustrative, not surveyed.

Framed views (frame_building or frame_element_ids) take three more opt-in camera options. All three are off by default, so earlier renders reproduce unchanged:

  • camera_lens_mm (12–200) overrides the 48 mm lens (45 mm for details). The framing fits the building at any lens, so a wider lens stands closer and gives stronger perspective, not a bigger building.

  • vertical_lines: "converging" tilts the camera at mid-height, as a close street photo does, instead of the default level camera with a shifted frame ("parallel").

  • frame_margin (1.0–2.0, default 1.18) is the fit factor; a lower value frames tighter. With converging verticals and an oblique camera_azimuth_deg, check the render's framing margins against your QA threshold.

Plan room fills are white. Optional floor-pattern lines use neutral grey. Sheet presentation also accepts floor_patterns, glazing_shading and show_scale_bar, all off by default. Floor lines are clipped to supplied room polygons (180 mm boards, 300 mm grid for rooms named “Bad”); finishes remain illustrative. Scale bars use model millimetres divided by the declared sheet scale; they are omitted on axonometric views. PDF sheets retain their declared paper size. Print at 100%, without fit-to-page scaling.

HDRI lighting and scanned materials

Import local HDR/EXR lighting and JPG/PNG texture maps through tetragon import-render-assets pack.json or MCP import_render_assets(spec). Example manifest (paths must be inside allowed source roots):

{
  "id": "daylight-v1",
  "environment": "/allowed/path/daylight.hdr",
  "materials": {
    "brick": {
      "albedo": "/allowed/path/brick-color.jpg",
      "normal": "/allowed/path/brick-normal.png",
      "roughness": "/allowed/path/brick-roughness.jpg",
      "displacement": "/allowed/path/brick-height.jpg",
      "repeat_m": [2, 2],
      "bump_m": 0.003
    }
  },
  "attribution": "Asset creator and source URL",
  "license": "CC0-1.0"
}

Only albedo is required for each material. Supported roles are brick, tile, deck, concrete, grass, gravel, plaster (rendered facades and partitions) and paving (the courtyard and street ground). Normal maps use OpenGL tangent-space orientation; normal, roughness and height maps are linear data. Height maps drive shading bump, not CAD geometry. Repeat dimensions are metres. Assets are copied, hashed and bounded to 64 MiB per file and 256 MiB per pack. Pack IDs are immutable; use a new ID to update assets. Rendering verifies hashes and packs images into the .blend, preserving attribution in its world and report. The importer validates file signatures but is not a general-purpose image malware scanner.

tetragon render my-building BUILD_ID --asset-pack daylight-v1 --view garden --context garden \
  --environment-rotation-deg 120 --environment-strength 1 --exposure 0.35 \
  --camera-azimuth-deg 24 --camera-height-m 3.2 --width 1920 --height 1200 --samples 96

Camera azimuth/height override perspective presets; axonometric framing stays orthographic. Explicit height keeps perspective verticals parallel using lens shift. Without an asset pack, the procedural sky/material workflow remains available. HDRI sunlight is illustrative, not geolocated to the project. The local review uses CC0 Poly Haven lighting and scanned materials; downloaded assets are private workspace data, not distributed with the Python package. render-packs/ records each pack's sources and hashes, and scripts/fetch_render_assets.py rebuilds the packs (see New device).

Opening heads and balcony dimensions

set_opening_head_heights(project_id, expected_revision, opening_ids, head_above_floor_mm, evidence) preserves each selected sill and adjusts opening height relative to its finished floor, accounting for the host wall base. Selection is explicit: it does not infer alignment from an address or photograph. The whole update validates frame/glazing clearance and wall fit before saving. Glazed doors accept transom_height_mm (default 0) for modeled upper frames and glass; the native TransomHeight property remains editable. The study uses 2300 mm heads and 300 mm transoms as design values. Outward swing remains explicit with swing: "out".

create_balcony_detail_sheets(project_id, expected_revision, balcony_id, scale=20) adds uniquely numbered A3 plan/front/side sheets. show_balcony_dimensions: true also enables dimensions in ordinary architectural plans and façades. In plans the width is dimensioned on the balcony's front frame edge and the depth on a side edge, each 5 mm (paper) outside the balcony for any cardinal rotation; earlier builds drew the width on the paper-bottom edge 10 mm away, which landed against the wall for balconies projecting up the sheet. Width, projection, guard/frame height and front-rail clear access dimensions regenerate from current native geometry; they are not frozen labels. show_rooms: false suppresses room labels/washes on isolated details. Cardinal balcony rotations are supported; oblique balconies require a separately designed true-length view. These sheets do not resolve anchors, welds, loading or structural approval.

Floor slabs accept optional openings (closed polygon point lists, without repeating the first point). Voids must lie strictly inside the slab and must not touch/overlap. They cut every layer and survive native recomputation, mesh and IFC export. The example includes return stairs, landings, guards, voids, fitted fixtures and loose furniture as ordinary editable native solids; it is a design study, not a structural or accessibility certification.

An architectural floor plan can set source_overlay with reference_id, pixel_origin, model_origin_mm, crop_px: [left, top, right, bottom] and model_opacity (0 for the scan alone). The referenced PNG must be imported and calibrated in pixels using a known dimension. The build checks its hash and workspace containment, then embeds it in the native sheet so reopening does not depend on the source file's location. Source pixels retain their measured mapping to model millimetres. Scanned ink remains raster; overlaid model geometry and annotations remain vector.

The optional review-booklet script combines matching render reports and native sheets without rescaling technical pages or relabelling their scale:

uv run --with pymupdf python scripts/make_review_booklet.py BUILD_REPORT RENDER_REPORT [RENDER_REPORT ...] --output review.pdf

A4 sales presentations

Use the separate sales workflow for a booklet: coloured cover and render frames, accent labels, white drawing pages and compact footer captions. Its colours, wording, typeface, logos and default company come from a client profile (docs/client-profiles.md): --profile PATH, else $TETRAGON_PROFILE, else ~/.config/tetragon/profile.json, else Tetragon's neutral profile (the Tetragon wordmark, slate and blue, English wording, Helvetica). Flags override the profile. Supply authorized local PNG/JPEG logos with --logo-light (dark pages) and --logo-dark (white drawing pages), or in the profile. --company, --address and --revision add case details to the cover and page footers; logo hashes and issue metadata are recorded in the PDF sidecar. The technical sheet export above retains its existing layout.

Use --minimal for a visual sales deck: it omits drawing-page explanations, repeated status text and redundant cover metadata. Titles, dimensions, drawing scales, logo and case details remain. Supply a short --note for the cover's provisional-status line; keep detailed source and QA explanations in the separate technical material. Existing callers retain the fuller layout.

First derive unframed views from an immutable native build with architectural drawings:

PYTHONPATH=src QT_QPA_PLATFORM=offscreen scripts/freecad-macos \
  scripts/export_sales_views.py BUILD_REPORT .tetragon/sales-views

Then compose matching renders and views:

uv run --with reportlab --with pymupdf python scripts/make_sales_booklet.py \
  BUILD_REPORT .tetragon/sales-views GARDEN_RENDER_REPORT DETAIL_RENDER_REPORT \
  --output .tetragon/sales-presentation.pdf \
  --title 'Boligblok med altaner' --subtitle 'Altaner, trapper og nye uderum' \
  --case-number 'TETRAGON / STUDIE' --date '16. november 2026' \
  --font-dir /absolute/path/to/fonts

The font directory holds one family's <Family>-Regular.ttf, -Bold.ttf and -Light.ttf (or name the family with font.family in the profile); retain the fonts' license. Without a font directory (flag or profile), the exporter uses Helvetica and records that choice in the sidecar. ReportLab and PyMuPDF are optional authoring dependencies, not additions to the MCP runtime.

Overview plans/facades default to 1:100, sections to 1:75; --overview-scale and --section-scale set explicit alternatives on the view exporter. Selected-element details retain their source scale. --keep-scales preserves all source drawing scales, and --use-project-style preserves the project palette. Drawings are cropped and placed at 1:1 physical paper size; oversized views fail instead of silently shrinking. Print the finished A4 PDF at actual size. Balcony dimensions, model room/street labels, and red dwelling/stairwell separation paths remain. Generated balcony specifications move to the page notes. Site/cadastral and axonometric sheets are omitted from this sales pack. Scan underlays stay raster at their calibrated scale. Dimension labels keep a white backing in plans and sections. In elevations they have none, as in V1, because a box there hid the window and door heads under the balconies. An elevation's Ca. label hangs below its line, moved along it on the facade to the nearest place clear of the facing openings. Where there is none (at 1:150 an opening head is often about 2 mm below the balcony), it keeps its place just above the line, nearest the balcony.

The exporter checks snapshot revision, native element count, build identity, image hashes, and view-pack hashes/containment. It writes new outputs and refuses existing destination names; the saved native model and technical sheets are not modified. The PDF sidecar records the source build, render IDs, scales, crop/placement coordinates and final hash. This establishes export provenance, not survey accuracy. The default status is the profile's (Illustrative study in the neutral profile); the synthetic study must not be presented as a surveyed reconstruction of a real building.

Authoring checks: uv run --with reportlab --with pymupdf pytest -q scripts/tests.

Interior-door swing symbols are hidden in the sales plans. Exterior-door swing symbols remain; door openings, frames and model geometry are retained. Technical plans keep their swing symbols.

Detailed study stairs

The presentation study's exterior stairs have six equal 150 mm rises, 280 mm goings and 900 mm clear tread width. Each step has two 30 mm timber boards with 2 mm eased edges, a 4 mm drainage joint and a 25 mm nosing. Separate steel risers, tread bearings, 8 mm stringers, foot plates, end plates and illustrative bolt heads are editable native solids. The top nosing is flush with the 900 mm balcony deck and the 1100 mm stair guard connects to the balcony guard. Internal timber stairs retain their 18 equal rises and gain nosings and risers that finish at the tread underside. Balcony deck joists are modeled separately.

tetragon.stair_details.balcony_stair_parts generates ordinary sweep records for a straight flight along local +Y, with configurable width, rise count, going and rotation. Its origin is the first riser at the supplied terrain height in storey coordinates. Persist the returned records through the existing building-change tools; it introduces no new project element kind. Regenerate the assembly when its geometry changes. The study includes 1:20 stair-section and 1:2 tread-detail views. These are illustrative construction details, not engineered connections, load calculations, fixing specifications or a regulatory compliance assessment.

Fitted roof edges

create_roof_edge_details(project_id, expected_revision, roof_id, wall_ids, projection_mm=180, depth_mm=300, replace_existing=false) fits four masonry closures and two outward stepped cornices to the underside of a rectangular gable roof. The four exterior walls must enclose its footprint, share a level head, and belong to its storey. Rotated footprints and reversed wall paths are supported. Intersecting roof/wall levels, mismatched enclosures, and a cornice beyond the roof overhang are rejected. Profiles rise outward and the top follows the roof slope. Both roof eaves edges are plumb (vertical in section); this is verified on native faces. Cornices and masonry closures receive solid section fill and hatching.

The masonry-cornice preset now also steps from 60 mm at its bottom to 180 mm at its top; previously serialized profiles remain unchanged.

These are explicit derived solids. Regenerate after roof or wall changes, using replace_existing=true to replace their deterministic IDs. Other trims are not deleted; remove any superseded independent cornices explicitly. This is geometry fitting, not a roof bearing, weatherproofing or structural detail design. The presentation study includes a 1:5 section of the fitted gesims and masonry closure; the full assembly appears in section A-A.

Source review and measured comparisons

  • inspect_source_evidence(project_id) / tetragon sources PROJECT verifies reference hashes, lists calibration, separates retained BBR facts from modeled geometry, and reports which Skråfoto directions appear in the retained catalogue. Missing retained views do not prove that the provider lacks them.

  • measure_reference_distance(project_id, reference_id, measurement) / tetragon measure-reference PROJECT REFERENCE measurement.json measures explicit points on a calibrated plan or an explicitly controlled planar photo. Page and coordinate units must match calibration. Optional target: {kind: "element", id: "wall", parameter: "length_mm"} compares with current model geometry; it never changes the model.

  • import_skraafoto_preview(project_id, expected_revision, catalogue_reference_id, item_id) attaches a JPEG preview and hashed provenance through the documented Dataforsyningen thumbnail service. It accepts only official CDN image paths. The live thumbnail endpoint returned HTTP 404 on 2026-11-16; the adapter is fixture-tested, but live preview import is currently unavailable. Failed calls do not advance the project revision.

Example plan measurement:

{"start":[453.25,817],"end":[606.5,817],"page":7,"unit":"pdf_point",
 "point_uncertainty":0.5,"scale_uncertainty_mm":50}

A photo requires photo_plane with four corners ordered top-left, top-right, bottom-right, bottom-left, width_mm, height_mm, coplanar: true, and evidence explaining the controls. This corrects perspective on that plane only. Point sensitivity is not a survey confidence interval: lens distortion, control accuracy, relief and scale uncertainty remain separate. Original image GSD cannot be applied to downsampled preview pixels. There is no automatic image interpretation, OCR, camera calibration or photogrammetric reconstruction here. Dataforsyningen map imagery supplies context; cadastral boundaries require separate evidence.

Summer renders can use --tone-mapping neutral (Khronos PBR Neutral, supported by the verified Blender 5.2 runtime) to retain stronger sky and material colours. The default remains agx. Use an appropriate HDRI, rotation and explicit exposure; this is illustrative lighting, not a geolocated solar study. Rendering records the option in its immutable report.

Gutters and downpipes

connect_gutter_downpipes(project_id, expected_revision, gutter_id, offsets_mm, terrain_mm, setback_mm=0, bend_drop_mm=300, diameter_mm=90, wall_mm=2, replace_existing=false) cuts outlets through a straight horizontal gutter and creates hollow pipes down to the supplied absolute local terrain elevation in mm. Positive setback is left of the gutter path; the offset uses two 45-degree bends after the initial vertical drop. Gutter/pipes use the same storey, with absolute terrain converted to that storey's coordinates. Check clearances against walls, roof and gesims for each route. The study has four 90 mm pipes with 2 mm walls, 255 mm offsets and local terrain 0.000; these are design values.

profile_voids adds enclosed voids to ordinary sweep profiles. gutter_outlets contains {offset_mm, diameter_mm} clear bore definitions and is restricted to straight horizontal gutters. Old files without these fields still load. Files using them require this version of Tetragon. Existing outlet holes are retained during fitting; explicitly edit the gutter record to remove superseded outlets. Replacing generated pipes is opt-in. No automatic binding is created: regenerate after gutter or terrain changes.

This models connected geometry, not hydraulic sizing, gutter fall, brackets, sealant, underground drainage or surveyed terrain. --terrain-elevation-m 0 sets the illustrative render ground to the same local level (CLI render units are metres). Without this option, the prior automatic ground-level selection is retained; the ground mesh's top now reaches that level instead of ending 20 mm below it.

Explicit junctions and repeatable QA

Walls, slabs, roofs and sweeps accept optional trim_by: [element_id, ...]. The named solids own the shared volume; the receiving element is cut back to their actual surfaces. FreeCAD stores live TrimBy links, so cutter edits recompute the junction. Missing IDs, duplicate cutters and dependency cycles are rejected. An empty list preserves previous geometry. Use this deliberately: a collision-free model does not establish a sound bearing, waterproofing detail or fire separation. Files using these new fields require this version of Tetragon.

A single glazed entrance door can use arch_rise_mm with a sufficiently tall transom. Its outer frame, transom frame and glass have concentric circular heads. Zero retains the rectangular family. Supplier identity and measured dimensions still require evidence.

Read-only native audits do not restore Python proxies or regenerate drawings:

PYTHONPATH=src scripts/freecad-macos scripts/audit_build.py \
  /absolute/build-directory /new/path/audit.json \
  --scan-storey all --rooms --require-clear --checks /absolute/connection-checks.json

--scan-storey all tests every element pair, including adjacent storeys. Findings above 1 mm³ remain visible for review. Explicit checks contain pairs with a, b, max_overlap_mm3 and optional max_gap_mm; probes with id, targets, points_mm and tolerance_mm; or coverage with id, source, targets, axis, position_mm and max_uncovered_mm2. Coverage compares the whole selected planar face area against the target solids. It prevents a corner contact from being mistaken for complete roof support. Select adjoining taller walls as targets where they legitimately cover a lower wall's top. Never include the source itself. Unlisted surfaces, unsampled gaps and construction adequacy remain unverified.

The audit checks persisted shape validity, positive volume, element inventory, bounds and volumes against the immutable build report, and records source hashes. A failed explicit connection check returns a nonzero exit code. A scan's requires_review status is not a pass, even when the scan completed successfully.

For sales composition without repeating native hidden-line projection:

PYTHONPATH=src scripts/freecad-macos scripts/export_sales_views.py \
  /absolute/build-report.json /new/path/sales-views --saved-vectors --keep-scales

This retains the saved sheets' geometry and scales, checks retained SVG subtrees and balcony dimensions, hides interior door swings and records each source SVG hash. Reopening native files and visually reviewing the final PDFs are separate checks. Saved vectors do not prove that a previously failed projection now works.

Façade and room QA: fit_facade_band fits an existing straight horizontal cornice to the explicit left/right face of a host wall using its actual thickness. It preserves the profile, span and elevation and records the derivation. Refit after host edits; verify actual contacts and intersections separately. It does not infer exterior orientation or attachment design.

Build reports now include room_audit; inspect_room_boundaries returns it with the build revision and current/stale status. scripts/audit_build.py --rooms independently recomputes it. Room proposals use uncut joined wall envelopes at floor +1,000 mm, closing openings and including shafts. They are model enclosure areas, not surveyed or statutory net areas. Crossed walls, missing boundary area, shared enclosures and open boundaries require review. Ambiguous regions and holes receive no automatic replacement. Apply reviewed proposals through the existing revision-controlled room batch, then rebuild.

--require-clear makes requested scan/room findings fail the audit process. Without it, scan findings remain advisory for compatibility; failed explicit connection checks still always fail. A green gate only covers the requested checks.

Render UVs preserve metres on diagonal walls and pitched surfaces. Render reports hash the exact copied Blender worker used for the image; that worker is retained beside the render. Material appearance and context remain illustrative.

propose_closed_stair_flight returns editable closed timber stair components without changing the project. It preserves full tread bearing under the next 18 mm riser and provides side stringers. Supply the lower support beneath the first riser, an upper landing, and explicit trim_by links to adjoining slabs; review headroom, then apply the proposal through apply_building_changes. Dimensions and connections remain design assumptions, not structural approval.

Native connection checks also accept components, for example {"id":"floor-continuity","elements":["floor"],"max_components":1,"tolerance_mm":0.01}. This detects disconnected floor islands while allowing touching material layers. It reports every component with its element/solid index and volume. It does not remove small solids automatically: legitimate separate parts need explicit review. Connectivity is not bearing; use planar coverage checks for full riser support.

Native CAD styling and presentation sheets use the render mesh's solid material roles. Zinc and slate keep their material appearance across roof, wall and sweep primitives. Frame swatches do not recolour glass, external sills, timber decking or white iBOND. Unspecified native materials retain their existing kind defaults. These are illustrative material swatches, not calibrated surface colours. A glass material that also says frosted (matteret glas, e.g. a privacy screen: "Frosted laminated safety glass privacy screen (indbliksskærm)") is its own role: renders show rough, light, translucent glass, and drawings an opaque light panel (#e4e9e8) that hides what stands behind it. Clear glass screens stay see-through.

For a simple sales pack, use scripts/make_sales_booklet.py --simple with the usual build, view and render inputs. It creates 16:9 pages containing only renders, floorplans and facades, with small case details and no cover or construction sections. Drawing vectors retain their declared physical scale. Export the view pack with scripts/export_sales_views.py --light-plans for white wall cuts and fine grey hatching. Red separation lines and balcony dimensions are retained. Existing booklet and export defaults remain available.

Sales material that must not read as measured drawings uses two flags. Export the views with scripts/export_sales_views.py --approximate-only: it drops levels and every dimension annotation that is not approximate ("Ca."), keeps room names but omits their "≈ m²" areas (the drawing field show_room_areas, default true), and records approximate_only in the pack manifest. Then build the booklet with scripts/make_sales_booklet.py --visual-only: it refuses a pack exported without that flag, prints "Visualisering · ikke opmålt" in place of the "1:NNN" scale in the page footers, and records visual_only in the sidecar. The drawing vectors keep their physical scale; only the printed scale and the exact values are withheld.

stair_details.closed_winder_parts accepts ordered inner/outer riser lines and returns editable tread and riser slabs. It retains the full bearing strip beneath each following riser. Supply real landing geometry and check the resulting model with the native connection audit. A traced outline alone does not establish a usable walking line, adequate headroom or a compliant escape stair.

For an actual roof plan, set an architectural plan drawing's plan_mode to "roof". It projects the model from above, including lower roof extensions, instead of cutting through attic walls. Existing drawings default to "cut". Roof plans omit floor interiors and door swings; cadastral lines remain limited to site drawings. Balconies from other storeys are omitted; roof-level balconies remain visible. Lower roof extensions still appear. The same saved vectors feed the simple sales PDF.

Generated balcony dimensions use the Ca. prefix while their values remain derived from live geometry. Manual dimension annotations can opt in with approximate: true; old annotations default to false. Regenerate native sheets or export views without --saved-vectors to apply current drawing rules to an older build. Saved-vector export deliberately preserves the issued drawing. Floorplans also project exposed supporting-wall ledges behind balconies where the wall below is wider. These are clipped from existing masonry faces; empty space and unsupported balcony edges are never filled to imply contact.

balcony_documentation.attachment_checks(project, hosts) generates native rear-face coverage and zero-overlap checks from explicit balcony-to-wall IDs. Use the supporting facade at frame height, which may be the wall below at a storey thickness transition. Checking only the nearest distance can miss a largely unsupported frame. Passing geometry checks does not design anchorage.

Available Tools

58 tools
add_entrance_portalsC

Add zero-clash granite threshold steps, flanking pilasters, and moulded portal crown hoods around selected entrance doors. Also returns clear_zones per wall so plinth and rustication runs can break cleanly around every portal.

Inputs: side (required), door_ids (required), project_id (required), expected_revision (required), +7 more.

add_facade_mouldingsB

Add classical horizontal facade mouldings (cornice, stringcourse, water-table). Supply either host_wall_id + side (with optional breaks_mm intervals for downpipes/openings/balconies) OR a continuous multi-vertex perimeter_xy polyline (outward to the left of travel) for a single sharp FreeCAD-mitered corner sweep with zero corner clashes.

Inputs: z_mm (required), prefix (required), storey (required), project_id (required), +14 more.

add_roof_furnitureC

Add zero-clash roof assemblies: 'gutter' (eave_gutter_assembly: beaded half-round gutter tucked cleanly under roof drip edge + matching stop-ends), 'skylight' (roof_skylight: 4-bar flush frame + recessed glass seated above pitched roof), or 'firewall' (firewall_parapet: pitched parapet + flush saddle zinc coping under 300 mm protrusion).

Inputs: kind (required), params (required), project_id (required), expected_revision (required), +1 more.

add_window_hoodsC

Add moulded classical window-head cornice hoods seated cleanly on the exterior face of each selected window/door's host wall.

Inputs: side (required), project_id (required), opening_ids (required), expected_revision (required), +8 more.

apply_building_changesA

Atomically upsert whole storey/element/drawing records by ID. Unknown fields and invalid hosts fail the entire batch. Wall coordinates are centre lines; opening offset runs from wall start, sill from wall base; all elevations are storey-relative except drawing cut planes, which are absolute. Deleting a host requires removing its openings in the same batch. Historical revisions remain restorable.

Inputs: project_id (required), expected_revision (required), notes, rooms, +4 more.

apply_drawing_annotationsA

Upsert notes, street/address labels, red dash-dot party lines, dimensions, levels and section markers. Model points use local mm; paper points use sheet mm. Parcel boundaries are allowed only on site plans. Party-wall lines must reference a wall explicitly identified as a separating wall or adjoining gable/brandmur; ordinary partitions are not party walls. Supply positions and evidence; this tool does not discover legal boundaries.

Inputs: drawing_id (required), project_id (required), annotations (required), expected_revision (required), +1 more.

audit_build_geometryA

Run native FreeCAD OpenCASCADE B-Rep clash scan (and optional room enclosure check) on an immutable build. Automatically reuses the latest prior all-storey audit JSON so unchanged solids are skipped in seconds. Aim for 0 clashes before exporting final SVG/PDF sheets or photoreal renders.

Inputs: project_id (required), jobs, build_id, scan_storey, +2 more.

bind_site_addressB

Resolve a selected DAR ID and record EPSG:25832 origin plus BBR/parcel IDs. Never changes local geometry dimensions.

Inputs: dar_id (required), project_id (required), expected_revision (required).

build_projectA

Build a whole project in isolated FreeCAD, validate solids, and export FCStd plus requested STEP/SVG/IFC. Each build has its own directory and quantity report. No source/model file is overwritten. IFC requires FreeCAD's IfcOpenShell.

Inputs: project_id (required), formats.

calibrate_referenceB

Record two image/paper points, page number, and a known distance in mm. Returns the exact scale. Perspective photographs require rectification before using a single scale.

Inputs: project_id (required), calibration (required), reference_id (required), expected_revision (required).

check_building_layoutB

Check declared interior wall grids, unsupported endpoints and conflicts with other hosts' windows/doors. Each interior wall can declare its wing's grid_angle_deg. Errors block builds; free ends are warnings requiring review.

Inputs: project_id (required), tolerance_mm.

check_family_instanceA

Validate one element record without a project: {valid, errors[loc, msg]}. Missing placement gets neutral stand-ins; host fit and overlaps are checked when the batch is applied.

Inputs: element (required).

collect_site_contextC

Fetch and retain BBR, Skråfoto catalogue and a site map as hashed project references. Requires a resolved site origin; keeps registry metadata separate from measured geometry.

Inputs: project_id (required), expected_revision (required), radius_m.

connect_gutter_downpipesB

Cut clear outlets in a straight horizontal gutter and add hollow downpipes to an explicit absolute local terrain elevation in mm. Positive setback runs left of the gutter path; offset bends are 45 degrees. Pass add_fittings=True to also add zero-clash galvanized gutter cradle brackets (rendejern), outlet funnel collars (tudstykker), pipe collar clips (rørbøjler), and cast-iron base boots (støbejernsfod). Existing outlet holes are retained; generated pipes need explicit replacement to regenerate.

Inputs: gutter_id (required), offsets_mm (required), project_id (required), terrain_mm (required), +7 more.

create_balcony_detail_sheetsB

Add native model-linked balcony plan/front/side details with dimensions, clear rail gaps and component callouts. Uses selected balcony geometry only; no structural approval claim. Default A3 1:20. Cardinal rotations only for these orthographic detail sheets.

Inputs: balcony_id (required), project_id (required), expected_revision (required), scale.

create_projectB

Create an empty building project. A supplied address is a label until resolved with DAR.

Inputs: name (required), project_id (required), address.

create_project_from_outlineA

Create a new project bound to a DAR address from its GeoDanmark building outline: origin at the outline's south-west corner, local vertical datum, storeys from BBR unless given, exterior wall centre lines offset inward by half the wall thickness and one floor slab per storey. Attaches the outline, BBR and map as hashed references. All geometry is estimated: the outline is the roof edge including eaves, not surveyed walls.

Inputs: name (required), dar_id (required), project_id (required), storeys, +2 more.

create_roof_edge_detailsA

Fit four masonry closures and two outward stepped cornices to a rectangular gable roof and its four exterior walls. Roof footprint must match outer wall faces. Explicit derived solids, not live roof bindings: regenerate after changing roof or wall geometry. Existing generated IDs require replace_existing=true; separate trims are never deleted. Dimensions and profile remain design assumptions, not structural certification.

Inputs: roof_id (required), wall_ids (required), project_id (required), expected_revision (required), +3 more.

create_view_sheetsA

Create a site sheet, numbered floor plans, four local-axis facades and two sections. Pass presentation={} or custom colours/options for illustrated material views, a compact frame and an additional axonometric sheet; those use separate IDs. Surface patterns are illustrative, not material specifications. Existing IDs are never overwritten. Build with svg/pdf for printable sheets and linked native TechDraw pages. Local axes are not presumed compass directions.

Inputs: project_id (required), expected_revision (required), paper, scale, +2 more.

family_historyB

Every revision of a saved custom family, newest first, with its own parameters and the parent revision it was pinned to.

Inputs: family_id (required). Returns: result

fetch_building_recordC

Read BBR building facts with provenance. Registry area/storey counts are not survey dimensions.

Inputs: bbr_id (required).

find_repeated_elementsA

Find elements that share one type, in one project or across the workspace: candidates to save once as a family and reuse. Groups list member IDs per project, the families already in use, saved families or presets the type already matches, and suggested_parameters (the values that differ from schema defaults) ready for save_family. ignore_parameters (e.g. width_mm, height_mm) leaves those to each instance, so one family covers several sizes. Placement and joins never split a group.

Inputs: kinds, limit, min_count, project_id, +1 more.

fit_facade_bandA

Fit an existing horizontal cornice band to the left/right face looking from host start to end. Uses actual wall thickness, preserves span/profile/height and records derivation. Explicit geometry: refit after host changes. Does not infer which side is exterior, trim collisions, or certify attachment.

Inputs: side (required), band_id (required), project_id (required), host_wall_id (required), +1 more.

generate_sweep_profileA

Generate a validated counter-clockwise 2D sweep profile in mm (x outward left of path, y up) from a named generator in list_profile_generators, together with bounding-box and area metrics.

Inputs: name (required), parameters.

get_building_scheduleC

Audit floors, finished levels, clear heights, opening sill/head levels and explicit parameter evidence. Lists unverified dimensions; numerical precision is not source accuracy.

Inputs: project_id (required).

get_familyB

Read one family: resolved parameters, lineage (nearest first, each with the revision it is pinned to), the custom record, families built on it, and its instances across the workspace (current, behind the latest revision, or unlinked).

Inputs: family_id (required).

get_family_schemaC

Field specs for a kind's family parameters: type, bounds, default, enum values, unit, help and whether the field is placement (chosen per instance) rather than type.

Inputs: kind (required).

get_family_usageB

Count family instances across the workspace's projects (or one project): per project, how many follow the family's current revision, lag behind it, or carry no revision.

Inputs: family_id, project_id.

get_opening_scheduleC

Read resolved window fag/pane sizes, sprosser, door leaves, fixed sidelights, swing and sill/head levels. Preserves parameter evidence and separate supplier references; does not certify dimensions or products.

Inputs: project_id (required).

import_referenceB

Copy a local reference from an explicitly configured source root. SHA-256 deduplicated; no upload. PDFs/images are evidence, not automatically measured geometry.

Inputs: kind (required), path (required), project_id (required), expected_revision (required), +1 more.

import_render_assetsA

Import local HDRI/PBR files into an immutable hashed pack. spec: id, environment (optional .hdr/.exr path), materials mapping roles brick/tile/deck/concrete/grass/gravel to albedo/normal/roughness/displacement PNG/JPG paths, repeat_m [width,height], bump_m; attribution and license required. Sources must be in configured source roots. No downloading or scripts. Pass resulting ID as render_project options.asset_pack.

Inputs: spec (required).

import_skraafoto_previewA

Import a selected item from a verified, retained Skråfoto catalogue as a hashed JPEG preview plus provenance. Uses configured Dataforsyningen credentials with a fixed endpoint and allowlisted CDN. Preview is for visual selection, not full-resolution metrology. Read the licence in original metadata; no arbitrary URL input.

Inputs: item_id (required), project_id (required), expected_revision (required), catalogue_reference_id (required).

inspect_projectB

Read parameters, sources, warnings and last successful geometry/quantity report; flags stale builds.

Inputs: project_id (required).

inspect_room_boundariesA

Read the latest build's model-derived room enclosure audit and proposed outlines. Requires a new build after changes. No automatic repairs; ambiguous/open enclosures need review. Areas close openings and include shafts, not surveyed or statutory net areas.

Inputs: project_id (required).

inspect_source_evidenceA

Audit imported source hashes, calibration coverage, BBR facts and retained Skråfoto dates/directions. No network or geometry mutation. Missing catalogue views may exist in other search pages. Original GSD is not preview resolution or facade accuracy; registry areas are not wall lengths. Inspect identity/date conflicts before refining a model.

Inputs: project_id (required).

instantiate_familyA

Expand a preset or saved family into an element record; validate and persist with apply_building_changes, or use place_family_instances to do both. Supply ID, storey, host/offset or path as appropriate. Explicit parameter overrides create variants. A saved family's instance records the family_revision it follows.

Inputs: family_id (required), parameters (required).

list_familiesA

Get the built-in presets (wall thicknesses, manufacturer-reference windows/doors, Danish steel balconies, cornices and gutters) and the workspace's saved custom families. A custom family that extends another lists its resolved parameters, with what it stores itself in own_parameters. Product metadata separates published facts from modeling assumptions.

Inputs: no named parameters.

list_profile_generatorsA

List all parametric 2D sweep profile generators (classical-cornice, stringcourse, water-table, window-hood, firewall-coping, half-round-gutter, box-gutter, stepped-cornice, ogee-cornice, l-angle, handrail, eave-kick, rectangle) with their parameter definitions and titles.

Inputs: no named parameters.

list_projectsA

List projects within the configured Tetragon workspace.

Inputs: no named parameters. Returns: result

measure_reference_distanceA

Measure two points on a hash-verified reference and optionally compare with a model dimension without editing it. Plans require matching calibrated page and units. Photos require explicit coplanar rectangle corners (TL,TR,BR,BL), known width/height and control evidence. Returns replayable inputs, estimated distance and uncertainty limitations; never infer plane dimensions from a photograph or apply original-image GSD to a preview.

Inputs: project_id (required), measurement (required), reference_id (required).

place_family_instancesA

Place one or more instances of a family in one revision-checked batch. Each instance gives id, storey and placement, plus any instance overrides. A window or door gives host and exactly one of offset_mm (left edge from the wall start), centre_mm (its centre from the wall start) or at ([x, y] on the wall, projected onto its centre line); sill_mm is from the wall base. Instances of a custom family record its current revision. Existing IDs need replace=true. The whole batch is validated (host fit, overlaps) or nothing is saved.

Inputs: family_id (required), instances (required), project_id (required), expected_revision (required), +1 more.

prepare_site_referenceB

Extract model-aligned 12.5 cm Danish orthophoto ground tile, GeoDanmark 3D context neighbours (with concave subject auto-exclusion), and courtyard lawn/tree hints for a georeferenced project. Pass the returned ortho_ground_image, ortho_ground_extent_m, and context_buildings (loaded from bundle_path) into render_project with photoreal=True.

Inputs: project_id (required), fetch_live.

propose_closed_stair_flightB

Propose editable treads, closed risers and side stringers; does not mutate a project. Local ascent is +Y. Lower support must cover the first riser's 18 mm footprint; upper landing starts at risers * going. Add explicit trim_by links to adjoining slabs, apply a revision-controlled batch, then check clashes, bearing coverage and headroom. Geometry is provisional design, not structural/regulatory certification.

Inputs: prefix (required), storey (required), evidence (required), origin_mm (required), +5 more.

render_projectA

Render an immutable mesh build in Blender Cycles (Metal GPU on macOS), producing PNG and editable blend. Key options: photoreal=True (Option C Cycles: clear low-iron glass with 3D sunlit Scandinavian rooms, micro-weathering, 3D roof ridges/valleys, scanned CC0 textures, velvety lawn blades, 3D context neighbours), view garden/street/detail/axonometric, context studio/garden/street/courtyard, width 320..3840, height 240..2160, samples 8..256 (96–112 with photoreal=True + denoiser is fast and clean), device auto/cpu, asset_pack ID, sky/sun_elevation_deg/sun_azimuth_deg, camera_location_m/camera_target_m/lens_mm/shift_y, ortho_ground_image/ortho_ground_extent_m, context_buildings, plantings, trees, courtyard_props, balcony_staging, film_grain, aerial_haze, aperture_blades. First build with format mesh.

Inputs: build_id (required), project_id (required), options.

restore_family_revisionA

Save an earlier revision of a custom family as its newest revision; nothing in history is lost. Families built on it are re-pinned. Existing instances change only through update_family_instances.

Inputs: revision (required), family_id (required), expected_revision (required).

restore_revisionB

Restore an earlier project snapshot as a new revision; preserves the history being rolled back.

Inputs: revision (required), project_id (required), expected_revision (required).

save_familyA

Save a reusable custom architectural family to the workspace library. New families omit expected_revision; updates require it, and every earlier revision is kept. extends names a preset or custom family of the same kind whose parameters this one builds on, so parameters need hold only the changes; the parent's revision is pinned on save, and families built on this one are re-pinned to its new revision. Defaults are typed parameters, never Python or formulas. Instance cross-parameter constraints are checked when applying the building batch.

Inputs: family (required), expected_revision.

save_family_from_elementA

Save an existing element's type to the library as a custom family, for reuse in every project of the workspace. Placement (host, offset, sill, origin, path), joins (trims, caps, outlets), identity and evidence stay behind. With extends (a preset or custom family of the same kind) only the values that differ from it are stored. Updating an existing family needs its expected_revision. The project itself is not changed: link the element and its twins with link_family_instances.

Inputs: name (required), family_id (required), element_id (required), project_id (required), +4 more.

search_addressesB

Search current DAR entrance addresses through Datafordeler v3. Case-sensitive prefix; preserves ambiguous candidates and pagination.

Inputs: prefix (required), limit, cursor.

search_skraafotoB

Find oblique/aerial image metadata and asset links. bbox=[minE,minN,maxE,maxN] in EPSG:25832 metres. Credentials are redacted from returned URLs.

Inputs: bbox (required), limit, collection.

set_opening_head_heightsA

Align selected opening heads above their own finished floor, preserving sills and resizing heights. Use only the openings whose source supports alignment. Requires evidence, validates frame/glazing/host clearance, and saves atomically. Does not infer which facade heads should align.

Inputs: evidence (required), project_id (required), opening_ids (required), expected_revision (required), +1 more.

set_opening_sill_heightsA

Set sill height above each opening's finished floor. Converts to host-wall base, retains evidence, validates head clearance and saves atomically. Do not call an assumed dimension measured.

Inputs: evidence (required), project_id (required), opening_ids (required), expected_revision (required), +1 more.

site_overviewB

Gather a selected DAR address's BBR facts, basis and orthophoto map files, GeoDanmark building outlines (EPSG:25832 roof edges with DVR90 roof heights; the address building flagged) and the best-centred Skråfoto photo per collection and direction, newest first. Maps are written under the workspace .cache/studio. Outlines are roof edges, not wall lines; registry facts are not survey dimensions.

Inputs: dar_id (required), radius_m.

tetragon_statusA

Check runtime configuration and credential presence without returning secrets.

Inputs: no named parameters.

trace_plan_pointsB

Convert traced pixel/PDF-point positions into local mm using a reference's calibration. Y is flipped from page-down to model-up. This is drafting assistance, not automatic image recognition; returned geometry remains estimated.

Inputs: origin (required), points (required), project_id (required), reference_id (required), +1 more.

update_family_instancesA

Move a custom family's instances in a project to its current revision. A type value still equal to the instance's old revision follows the family; a value that differs is an override and stays. Placement and joins never change. dry_run reports what would change without saving. Instances without a recorded revision are reported as unlinked: link them first.

Inputs: family_id (required), project_id (required), expected_revision (required), dry_run, +1 more.

view_skraafotoB

Crop one Skråfoto photo around an EPSG:25832 ground point projected with its published camera model; height_m is DVR90 metres, defaulting to the GeoDanmark roof height at the point, else 10 m. Reads only the needed tiles from the official CDN and writes a JPEG under the workspace .cache/studio. Approximate projection, not rectified: never measure from it.

Inputs: easting (required), item_id (required), northing (required), collection (required), +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 58 tools

    Disambiguation3/5

    Most tools target distinct stages of the BIM workflow, and the long descriptions often spell out boundaries (e.g. place_family_instances vs instantiate_family). However several pairs genuinely overlap: instantiate_family vs place_family_instances, save_family vs save_family_from_element, and a cluster of geometry-adding tools (add_facade_mouldings, fit_facade_band, create_roof_edge_details, add_roof_furniture, generate_sweep_profile) plus four different audit/inspect tools that an agent could easily misselect.

    Naming Consistency4/5

    Almost all names follow a snake_case verb_noun pattern (list_families, get_family, apply_building_changes, create_project). A handful of read-only tools deviate with noun-phrase names (site_overview, family_history, tetragon_status), but the overall convention is predictable.

    Tool Count2/5

    58 tools is far beyond the 15-tool comfort range, and the family library alone contributes ~14 tools with subtle distinctions. The domain is genuinely broad (families, geometry authoring, site context, rendering, sheets), but the surface feels inflated and pushes cognitive load onto the agent.

    Completeness4/5

    Coverage is strong: project lifecycle, family CRUD with revision history, geometry authoring and validation, site/reference import, build, render and view sheets all exist. The main gap is deletion/cleanup operations (no delete_project, delete_family or element removal outside apply_building_changes batches), which agents can partially work around.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI to directly call FreeCAD for 3D modeling via the MCP protocol, providing 39 modeling tools including primitive creation, boolean operations, transformations, and export.
      3
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to programmatically build, analyze, and export 3D CAD geometry using FreeCAD through REST or MCP tools.
      MIT