Generate an IFC (BIM) model
cao_generer_ifcWHEN the drawing must leave as a real BIM file, openable in Revit/ArchiCAD/Solibri — not just a drawing. Draw a building scene and get an IFC4 file in millimetres: real spatial hierarchy (project/site/building/storeys), STABLE IFC GlobalIds (the same model keeps them across exports; pass projet_id; imported elements keep theirs), structural columns and beams (poteaux[], poutres[] become IfcColumn, IfcBeam; see GET /cao/schema), one named IfcSpace per room with its areas (floor, French habitable and Carrez), floor slabs cut by their stair openings, an IfcRoof, IfcStair flights, standard Pset/Qto quantities, and material layers carrying density and thermal conductivity. Wall/slab/door/window types, 2nd-level space boundaries, and Lambert-93 georeferencing (EPSG:2154, Scale 0.001) are included so Revit/Archicad can open a typed, located model. Declare compositions{} to replace type compositions. Doors/windows really cut their host wall (IfcOpeningElement + IfcRelFillsElement). Passes IFC4 schema and EXPRESS-rule validation. Validate locally with cao_valider_ifc (no buildingSMART account). Call cao_verifier first. Same scene as cao_generer_dxf. Returns a JSON object {ifc, elements, unites, schema}: the IFC file arrives INLINE as text in ifc — no download URL, nothing stored server-side, so write it to a .ifc file yourself. elements counts the IFC objects emitted and schema names the IFC version produced. Set armatures: true to add the reinforcement: IfcReinforcingBar with exact geometry for footings and lintels (aggregated to their host), one IfcReinforcingMesh per slab.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| murs | No | Walls: plan segments extruded vertically. Every coordinate in this whole scene is in MILLIMETRES, in a single plan frame whose origin you choose — X to the right, Y upward, Z up from the floor. Keep one consistent origin across murs/boites/plan: the generators never recentre anything for you. | |
| plan | No | 2D reference lines — drawn flat, never extruded and never counted in the quantities. Use them for axes, plot limits or setting-out marks. | |
| boites | No | Boxes (furniture, volumes): a rectangular block placed by its CENTRE, not by a corner. Millimetres, same frame as murs[]. | |
| georef | No | Optional Lambert-93 (EPSG:2154) false origin for IfcMapConversion. Local millimetres are scaled by 0.001 to CRS metres. Do not invent coordinates: omit est/nord if unknown (origin stays 0). orientation is the angle in degrees of project X from map East, counterclockwise. | |
| cercles | No | Circles on the 2D plan, alongside plan[] lines: each has a centre and a radius, in the same unit as the plan. Use for round shapes a polyline would render badly — fillets, posts, manholes. | |
| reseaux | No | Plumbing pipe runs (EF/EC/EU/EV/EP/chauffage) — used only by cao_pdf (technical plan + linear-meter quantities per type). | |
| toitures | No | Roofs — used only by cao_pdf. WITHOUT this field: a flat roof is auto-generated over the footprint of ALL walls (legacy default). WITH it: compose freely — each entry can target a subset of walls (via `murs`), letting you build an L-shaped building's roof, or add a dormer on top of a main roof. | |
| armatures | No | Add the reinforcement computed per Eurocode 2 (bars and slab meshes). | |
| plomberie | No | Sanitary fixtures (sink, WC, shower…) — used only by cao_pdf. Same positioning as electricite. | |
| decoration | No | Paint/finish per wall — used only by cao_pdf. Colors the elevations (exterior face) and the axonometric view (face auto-detected by orientation relative to the building's centroid). | |
| ouvertures | No | Doors/windows embedded in a wall — used only by cao_pdf (elevations + axonometric view), no effect on dxf/metres. | |
| electricite | No | Electrical symbols (outlets, switches, lights…) — used only by cao_pdf (dedicated technical plan + quantities), no effect on dxf/metres/render. Position: attached to a wall (`mur`+`position`, like ouvertures) or free (`x`,`y`). | |
| compositions | No | Named wall/slab layer sets declared by the project. A key that matches an inferred kind (mur_exterieur, refend, cloison, plancher, toiture) or murs[].composition drops the Hypothese flag. Each value is {libelle, couches: [{cle, epaisseur?}]}. cle: enduit, bloc_beton, isolant, ba13, ossature, enduit_platre, beton_arme, tuile, charpente, etancheite. Omit epaisseur on the load-bearing layer. |