Cocobox

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

Import the workflow

  1. 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.

  2. 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.

  3. Its first run asks you before each agent action. Runs after that behave like your own workflows.

Run it

  1. Open a tab in the project folder, pick 2D plan to BIM from the Workflows button by the message box.

  2. 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”.

  3. 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.

A flat plan of a one-storey cabin seen from above: two bedrooms with double beds and a bathroom between them, a living room with a sofa and rug, a kitchen, and a porch in front.
A floor plan the agent rendered to check the rooms against the brief.

What each step does

  1. Write the design brief. The parent turns your request into bim/design-brief.md and restates it in the chat.
  2. The brief is a checklist. A check: at least five checklist items and a must-have section.
  3. Confirm the brief. Your go-ahead, or the agent’s that started the workflow.
  4. Model the architecture, check it against the brief. The parent writes bim/architecture.ifc with the cad_kit building blocks, must-haves first, and bim/project.bim.json with 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.
  5. The federation file holds together. A check: a grid, levels and all five disciplines.
  6. Open the discipline tabs. Your go-ahead, after you compare the walls with the plan.
  7. 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.
  8. 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.
  9. Send the clashes to the tabs. Your go-ahead.
  10. 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.
The parent tab with its four discipline tabs nested under it in the sidebar, each finished, and the federated model in the chat.
The parent and its four discipline tabs.

Review the federated model

When an agent embeds the federation file in its answer, the viewer shows every discipline file together:

The architecture over the floor plan, cut at 1.6 m.
The architecture over the plan, cut at 1.6 m.
All five disciplines together over the plan, with a toggle for each.
All five disciplines together.

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.

A duct through a beam, with a comment box naming the duct and saying it goes to the HVAC tab.
A comment on the duct goes to the HVAC tab.

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, ![house](/path/to/bim/project.bim.json). 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" }
  ]
}

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: