# Create a simple IFC building in Bonsai by talking to your AI > Prompt · level: intermediate · about 60 min · paste into: Claude Desktop + Blender MCP · Claude Code · Codex · Antigravity · checked 2026-09-30 > ES: Crea un edificio IFC sencillo en Bonsai conversando con tu IA Generate a clean IFC4 model (project, site, building, storeys, walls, slabs, openings) with IfcOpenShell through Blender MCP or as a script, and validate it. **Before you paste:** Blender + Bonsai (or Python with ifcopenshell installed) · Optional: Blender connected via MCP. ## Prompt (copy everything inside the block, then fill the [BRACKETS]) ```text Create a simple IFC4 building model for me with IfcOpenShell, either by running code in Blender through MCP (with Bonsai loaded) or as a standalone Python script I can run. The building: [e.g. "a 2-storey house, 8 x 10 m footprint, 2.7 m floor-to-floor, 0.15 m block walls, 0.12 m concrete slabs, one door per floor and four windows per floor"] Units: metric (metres). Rules for the code: 1. First print ifcopenshell.version and use the API of THAT version. In IfcOpenShell 0.8+ the API is called like ifcopenshell.api.root.create_entity(model, ...). If a call fails, look up the function in the IfcOpenShell docs instead of guessing a new signature. 2. Build the structure properly: IfcProject with metric units and a 3D Model/Body representation context -> IfcSite -> IfcBuilding -> one IfcBuildingStorey per level with its elevation. 3. Create wall and slab TYPES first (with material layer sets), then occurrences that use them, each contained in its storey. 4. Give walls a body representation of the right length, height and thickness, and place them with object placements. Add openings for doors and windows and fill them with IfcDoor / IfcWindow. 5. Add basic properties (Pset_WallCommon: IsExternal, LoadBearing) and, if the API allows it, base quantities. 6. Save as [name].ifc. Then validate and report: count of each IFC class created, the spatial tree, and any warning from reopening the file. If you are working through Blender MCP, also take a screenshot of the viewport. Explain what each block of code does in one line. Answer in my language. ``` ## Notes for the agent presenting this - Show the block above verbatim in one code block; tell your human where to paste it (Claude Desktop + Blender MCP · Claude Code · Codex · Antigravity). - Point out the [BRACKETS] and offer to fill them together first. - The prompt pins the API version on purpose: IfcOpenShell's API changed style between 0.7 and 0.8 and models trained on older code mix both. - Good follow-up: `ifc-ids-check` to validate the result against requirements. ## Related - [Connect Blender and Bonsai to your AI via MCP](https://aibuilderacademy.netlify.app/prompts/blender-mcp-setup.md) (prompt) - [Check an IFC model against your requirements (IDS)](https://aibuilderacademy.netlify.app/prompts/ifc-ids-check.md) (prompt) - [Quantity takeoff from an IFC file (IfcOpenShell)](https://aibuilderacademy.netlify.app/prompts/ifc-quantity-takeoff.md) (prompt) ## Sources - https://docs.ifcopenshell.org/ - https://docs.bonsaibim.org/ - https://extensions.blender.org/add-ons/bonsai/ --- AI Builder Academy · https://aibuilderacademy.netlify.app · checked 2026-09-30 · Made by Lo que habitas (Julián Páez). Agents: search more at https://aibuilderacademy.netlify.app/api/search?q=… or connect https://aibuilderacademy.netlify.app/mcp. Request a new prompt: aibuilderacademy@agentmail.to.