2D plan to BIM
A ready-made workflow for architects and engineers. One agent turns your floor plan, description or reference pictures into a design brief, models the architecture and checks it against the brief, then opens a tab for each discipline. Each writes its own IFC on the same grid and levels, and you review the combined model in 3D.
Before you start
- Cocobox 0.14.3 or later, with CAD and BIM review on in Settings › Add-ons.
- An agent with a shell. Each tab installs IfcOpenShell in a Python environment if it is not there.
- A plan, a description, or both. A DXF is best, with walls, openings and the grid on their own layers. An image or a PDF page works too, with one known dimension. Reference pictures help the agent get the look right.
Import the workflow
Open the workflow gallery and click Open in Cocobox on 2D plan to BIM, or download the file and import it from the Workflows panel.
The Import sheet shows its steps and the two commands it runs: a check that the brief is a checklist, and a check that the federation file holds together. Keep it in the project or in your personal workflows.
Its first run asks you before each agent action. Runs after that behave like your own workflows.
Run it
Open a tab in the project folder, pick 2D plan to BIM from the Workflows button by the message box.
In the run note, name the plan and anything it does not say: “plans/hillside.dxf, single storey, 2.6 m ceilings”. For an image or a PDF page, give one dimension: “the south wall is 15 m”.
Press Enter. The workflow stops three times for you: to confirm the design brief, before it opens the discipline tabs, and before it sends the clashes back to them. When an agent started the workflow, that agent confirms the brief instead of you.
The design brief
Before it models anything, the agent writes bim/design-brief.md: a checklist of what you asked for. It lists the rooms with their sizes and furniture, the style and colours, the key features (a bay window, a round-topped door, a chimney), what is a must-have and what is nice to have, and what the agent assumed.
- You confirm it. Edit the file or answer in the chat, then approve. Modelling starts from the brief as you left it.
- Reference pictures show the agent the layout, mood and level of detail you want. If you ask it to copy a copyrighted design, the brief says so in one line and the design stays original unless you insist.
- Every item gets ticked. After modelling, the agent renders the model with cad_render and marks each item met, partial or missing, with the picture that shows it. It fixes what is missing before it reports, and anything it left out or simplified is said plainly and flagged, never dropped quietly.

What each step does
- Write the design brief. The parent turns your request into
bim/design-brief.mdand restates it in the chat. - The brief is a checklist. A check: at least five checklist items and a must-have section.
- Confirm the brief. Your go-ahead, or the agent’s that started the workflow.
- Model the architecture, check it against the brief. The parent writes
bim/architecture.ifcwith the cad_kit building blocks, must-haves first, andbim/project.bim.jsonwith the grid, the levels, the plan underlay and an entry per discipline. Then it renders the model, ticks the brief and fixes what is missing, and reports the checklist with the pictures. - The federation file holds together. A check: a grid, levels and all five disciplines.
- Open the discipline tabs. Your go-ahead, after you compare the walls with the plan.
- A tab per discipline. The parent opens Structure, Plumbing, Electrical and HVAC. Each reads the grid and levels from the federation file and writes only its own file, in its own worktree, renders it to check it, then reports where it is and ends its turn. The parent copies each file next to the federation file and writes each tab’s name into it, so comments find their way. Their questions go to the parent; their reports come back to it.
- Clash check. The parent compares every element of every discipline with IfcOpenShell and reports each clash with the two elements, where it is and a likely fix.
- Send the clashes to the tabs. Your go-ahead.
- Fix and check again. Each clash goes to the tab that should move its element; the parent checks again, up to twice. The final report has the brief’s checklist and pictures of the combined model.

Review the federated model
When an agent embeds the federation file in its answer, the viewer shows every discipline file together:
- A toggle and a colour per discipline above the model. Architecture keeps the file’s own colours; the others are tinted. A discipline whose file is not written yet is greyed out.
- Floor plan turns the 2D plan under the model on and off. It sits at its real scale, so you can check the walls against the drawing.
- Measure, Section and Comment work across all the files. A discipline you turned off cannot be clicked.


Clashes
The clash check compares the bounding box of every element with every element of the other disciplines. Architecture against structure is skipped, since columns sit in walls by design. A pipe, cable or duct that passes right through a wall or slab is listed apart, as an opening to coordinate.
To comment on a clash, click Comment and click the element. The box says which discipline it is and which tab gets your comment. The comment goes to the tab that owns that file, with the element’s IFC GlobalId, the point in the file’s own coordinates and your view. If that tab is closed, it goes to the tab you are in.

Boxes are a quick first check, not a full one: a diagonal or curved element can report a clash it does not have. Your coordination tools still have the last word.
The federation file
Any agent can write one, with or without the workflow. Embed it in an answer like a model, . Paths are relative to the file; models are IFC.
{
"name": "Three-bedroom house",
"units": "m",
"grid": { "x": [{ "name": "1", "at": 0 }, { "name": "2", "at": 5 }],
"y": [{ "name": "A", "at": 0 }, { "name": "B", "at": 5 }] },
"levels": [{ "name": "Ground floor", "elevation": 0 },
{ "name": "Ceiling", "elevation": 2.6 }],
"underlay": { "path": "plan.dxf", "scale": 0.001, "origin": [0, 0] },
"models": [
{ "discipline": "Architecture", "path": "architecture.ifc", "tab": "agent-3" },
{ "discipline": "Structure", "path": "structure.ifc", "tab": "agent-4" }
]
}
- underlay: a DXF, PNG or JPEG. A PDF page goes in as a PNG. scale is metres per drawing unit (0.001 for a DXF in millimetres) or per pixel; origin is where the drawing’s 0,0, or an image’s bottom-left corner, lands.
- tab: the agent that owns the file. Comments on its elements go there.
- color, optional: a discipline’s colour, like
"#2f8fdd".
Licensed professionals
The structural, plumbing, electrical and HVAC models agents write are drafts. Nothing in them is calculated, sized or checked against a building code. A licensed engineer or other licensed professional must check them, and take responsibility for them, before anything is built. The agents are told to say so in every report.
Try the demo files
The house on this page and on the architecture page came from this workflow’s steps, run as short IfcOpenShell scripts on a sample single-storey, three-bedroom plan. Download them and open the federation file in the viewer:
- The plan: plan.dxf (millimetres, layered) and plan.png (60 px per metre).
- The federation file: project.bim.json.
- The disciplines: architecture.ifc, structure.ifc, plumbing.ifc, electrical.ifc, hvac.ifc.