Model a public hall BIM from drawings
- Tools
- IfcOpenShell, PyMuPDF, NumPy, Pillow
- Time limit
- 8 hours
Agent is asked to build the BIM model of a public hall with galleries, three storeys over a basement, from its drawing set.
Agent Input
What the agent is given: the instruction and its input files.
Task: build the building from its drawings
You are given the drawings of Building B, a public hall with galleries: three storeys over a basement, about 110 m by 119 m. Build its BIM model from the drawings alone and deliver it as an IFC file,
/app/model.ifc.
What you are given
/app/sheets/: the drawing set, 18 sheets (A-101, A-102, A-103, A-104, A-105, A-201, A-202, A-203, A-204, A-301, A-302, A-303, A-304, A-501, A-601, A-602, A-603, G-001), as images only (no PDF, no text layer). <SHEET>.png is a whole sheet; the floor plans are large (set PIL.Image.MAX_IMAGE_PIXELS = None to open them) and are rendered so that one pixel is about 13 mm of building: crop them to read small text.
Nothing else describes the building. You have Python 3 with IfcOpenShell 0.8 (import ifcopenshell, ifcopenshell.api to write IFC), PyMuPDF (import fitz), NumPy and Pillow. Work in /app. The building is not published anywhere: the drawings are the only source.
No internet. Work from the drawings and the tools in this container only. Web search and fetching are switched off and downloads are refused; every run's tool calls are audited afterwards, and a run that reaches for the internet, the grader or the answer is void.
What to build
The whole building, every level that has a floor plan (Basement, Level 1, Level 2, Level 3, Roof): walls with their heights, their wall types and layers, doors with their door types, the openings cut in walls (door openings and window openings), wall connections and rooms. The sheets say all of it:
- Floor plans. Each plan is cut 1200 mm above its level and marks what it cuts. Beside every wall stands its type mark in blue (
W01...); near every door its type mark in red (D01...); beside every opening an opening mark in green (N01...); beside every curtain wall its type mark in orange (C01...); a room carries its number and name. The legend column at the right of each plan explains the marks and tabulates them. A wall mark belongs to the wall body nearest to it; a mark with a thin blue leader line belongs to the wall its leader touches (the end with the dot). - Wall heights. The legend of each plan gives that level's standard wall base and top, in mm from the level. A wall whose mark is plain (
W03) has the standard base and top. A wall whose mark carries two numbers (W03[-50,1450]) runs from that base to that top, in mm from the plan's level, instead. Sections and elevations show the same heights. - Marked means asked for. Model what carries a mark. Something drawn without a mark (a door with no red mark, a wall with no blue mark, the structure shown for reference) is not in the answer, and adding it counts against you.
- Openings. The legend lists every opening mark with its width, sill and head (mm from the plan's level); the legend's width is the opening's, also where the gap drawn in the wall differs a little. An opening with a door near it is that door's opening, and the door is centred in it (in its width and in the wall's thickness). A door with no opening mark beside it is written without an opening, centred in its wall's thickness. Where a doorway passes through two or three parallel wall layers drawn side by side, each layer has its own opening and mark; the door fills the opening of the thickest layer, and of equally thick layers the one whose wall mark has the lowest number (
W01beforeW02); the other layers' openings stay empty. Where the gap the plan draws for a door is wider than its opening's legend width because the opening stops at the end of its wall (the wall ends inside the doorway, at a crossing wall or at the next wall in line, which may carry an opening of its own), the door is centred on the whole drawn doorway, between its jambs, not on the opening, and fills the widest opening in it. A door standing in a gap that no wall body crosses (its jambs outlined, no wall mark in it) is centred in that gap, along it and across it. - Doors. A door's frame width and height are the ones the plan's legend gives for its mark; those are graded (the sizes on A-501 and in the door schedule are nominal). A door stands on its plan's level unless its mark says otherwise:
D03[+200]stands 200 mm above the level, andD03[1450x3125]gives the frame size of a door whose mark has several. - Wall thickness. A wall's body is as thick as the plan draws it; the legend lists the drawn thicknesses of each mark. Its type carries the layers of A-501 even where their total differs from the drawn thickness.
- Curtain walls. A curtain wall is a thin plane of glazing, louvres or panels on a frame, drawn on the plans as
a thin double line with mullion ticks, not as a wall. The legend of each plan gives that level's standard curtain
wall base and top; a mark with two numbers (
C03[0,14000]) gives its own, in mm from the plan's level. A curtain wall that rises through several floors is marked on each plan it crosses; it is one curtain wall, in the storey of its base. Where a curtain wall fills an opening of a wall (louvres), the plan draws its line in orange: it runs along that line, from the opening's sill to its head, centred in the wall. - Types. A-501 gives every wall type's layers; the schedules count the types.
Graded exactly:
- Wall types. Every
IfcWallhas anIfcWallTypewhoseNamebegins with its type mark (W01...), with its layers as anIfcMaterialLayerSet, eachLayerThicknesswithin 1.5 mm of sheet A-501. - Door types. Every
IfcDoorhas anIfcDoorTypewhoseNamebegins with its type mark (D01...). - Rooms. Every room an
IfcSpaceaggregated by its storey:Nameits number,LongNameits name, a body whose floor outline is the open floor around the room's label on its plan, bounded by the faces of the walls the plan cuts, by the inside face of a curtain wall's frame (the frame line toward the room), and by the heavy dashed lines, which are room boundaries (a heavy dashed line drawn along a wall runs on that wall's face). Nothing else bounds a room: columns and the structure drawn for reference standing inside or at the edge of a room do not (the room runs through them to the wall faces), and thin lines never do, also where a thin line crosses a gap between walls; wherever a room ends in open floor, the plan draws a heavy dashed line there.
The IFC file
- Schema IFC4 (IFC2X3 and IFC4X3 are read too). Declare the file's length unit; any unit is converted.
- Coordinates. Place everything so that, in the file's world coordinates, the origin is the intersection of grid line 1 and grid line T, x runs along grid T toward grid 24, y runs along grid 1 toward grid A, and z = 0 is datum 0.000 (Level 1). Level elevations are the ones the level table on G-001 gives.
- Grid lines. Every grid line the plans show, as an
IfcGridAxisof anIfcGrid:AxisTagthe tag in its bubble,AxisCurvea straight line (anIfcPolylineof two points) along it, in the same coordinates as everything else. How far you draw a line does not matter. - Spatial structure. One
IfcProject,IfcSiteandIfcBuilding; oneIfcBuildingStoreyper level that has a floor plan, with itsElevationfrom the level table on G-001. - Which storey. A wall, a door or a stair belongs to the storey it starts on: the highest level at or below its base (a base up to 600 mm under a level still belongs to that level). A wall that rises through several floors is one wall, in the storey of its base, however many plans show it; anything that starts under the lowest plan's level belongs to that lowest storey.
- Every element needs a 3D body (a
Bodyrepresentation: an extrusion, a brep or a mapped item). An element with no body is not read.
What is read, by class and relationship:
IfcWall: every wall a floor plan cuts and marks. Its body gives its centre line, thickness, base and top. Along a run, split walls however you like. Corners are read as built: where both walls stand, the walls together must fill the corner; above or below the lower of two walls that meet, either wall may fill the corner square or leave it.- Curved walls. A wall whose plan is a ring segment is read as curved: its body's plan vertices must lie on its two faces' circles, in chords of 10 degrees or less. Its centre, radius, ends and thickness are then compared.
- Wall connections: where two walls meet at a corner or a tee, declare it with
IfcRelConnectsPathElements(ATSTART,ATENDorATPATH). Joins between two pieces of one wall in line are optional. - Openings: every marked opening, as an
IfcOpeningElementthat voids its wall (IfcRelVoidsElement). Its body gives its centre, width, sill (base) and head (top). A window is graded through its opening; the window itself is not read. IfcDoor: every door, one element per opening (a double door is one door), filling its opening (IfcRelFillsElement) and contained in its storey. Its body, the size of its frame, gives its centre, base, width and height.IfcCurtainWall: every curtain wall a floor plan cuts and marks, contained in its storey, with anIfcCurtainWallTypewhoseNamebegins with its mark (C01...). Its own body and the panels, mullions and doors it aggregates (IfcRelAggregates) give its line, base and top; a curtain wall is not anIfcWall. Along a run, split it however you like. A door in a curtain wall has no opening: the curtain wall aggregates it. Panels, mullions and glass are not compared one by one: model them or not, inside the curtain wall's depth.
Stairs, glass panels, mullions, floors, roofs, columns and the structure drawn for reference are not scored. Model them or leave them out.
How it is scored
Exactly. Every element and every relationship is compared with the real model in 3D, to 12.7 mm (half an inch), and is right or wrong:
- a wall is right when its solid is: length, position, thickness, base and top each within the tolerance, in the right storey;
- a door when its centre, width, height and base are, in the right storey, filling an opening in the right wall (or aggregated by a curtain wall it stands in, for a door in a curtain wall);
- an opening when its centre, width, sill and head are, in the right wall, filled by a door exactly when the real one is;
- a wall connection when it is declared between walls that meet where the real ones do, over the same height (a connection declared where the real walls meet that is not asked for counts neither for nor against you; one declared where the real walls do not meet counts against you);
- a wall type when the wall is right and carries the mark and layers of the real wall it lies along;
- a door type when the door is right and carries the real door's mark;
- a curtain wall when its line, ends, base and top are, in the right storey, with the real curtain wall's mark (how it is split along its line and how deep it is are not compared);
- a level when a storey has its elevation and its name as the level table gives them (a storey for a level without a floor plan counts against you);
- a grid line when an axis has its tag and lies on the grid line, within the tolerance;
- a room when a space has its number, name and storey, and its floor outline is within the tolerance both ways.
Each kind scores F1 (missing elements lower the recall, wrong or invented ones the precision). A wall counts only with
its type mark and layers right, a door only with its type mark right: there is one walls category and one doors
category. A category is passed when at least 90 % of the real elements are exact and at least 90 % of yours are
right. The reward is the weighted share of categories passed: walls weigh 3; doors, openings, rooms, floors and curtain walls 2 each; joints, stairs, glass panes, roofs and window units 1 each; levels and grid lines together are one category of weight 1. Only the categories this task scores (the ones listed above) count; a kind named here that this task does not score has no weight (the mean of the kinds' F1 is reported beside it). The class matters: a wall written as an IfcBuildingElementProxy is not a wall.
When /app/model.ifc is written and opens in IfcOpenShell, check it against the plans and keep improving it while
you have time: a first complete model is rarely the best one. Finish by saying in two or three sentences how you read
the drawings and what you are least sure of.
You have 28800 seconds to complete this task. Do not cheat by using online solutions or hints specific to this task.

Grading & Reference Solution
How the submission is scored, and a human expert-authored reference solution.
Gates
The IFC is there and the verifier can read it.
- Model present · /app/model.ifc exists.
- Opens as IFC · IfcOpenShell opens it and its elements are read (IFC4; IFC2X3, IFC4X3 also).
Scored Categories
Every wall as a 3D solid, with its type mark and layers.
- Wall solid×2778 · Solid on a 1/2 inch grid, covered by right walls in its storey, none wrong; splits OK; corner squares eased. Curved walls: centre, radius, ends, thickness.
- Wall type mark×2778 · Every wall along it has an IfcWallType Name starting with its mark (W01 ...).
- Wall layers×2778 · Type's IfcMaterialLayerSet has the reference thicknesses, either order (A-501).
- Category passes · Recall: reference walls exact with mark and layers. Precision: IfcWalls within 1/2 inch, right mark and layers.
Every curtain wall or storefront, as a plane.
- Curtain wall plane×110 · Plane of body and aggregated parts: line, ends, base, top, storey; splits and depth ignored.
- Curtain wall type mark×110 · Compared only with curtain walls whose IfcCurtainWallType Name starts with its mark (C01 ...).
- Category passes · Recall: reference curtain walls exact. Precision: IfcCurtainWalls within 1/2 inch of one of their mark.
Every door, paired one to one with the nearest submitted door.
- Door size and place×362 · Frame centre, width, height and base, in the right storey.
- Door host×362 · Fills an opening (IfcRelFillsElement) of its wall; storefront doors aggregated by their curtain wall.
- Door type mark×362 · IfcDoorType Name starts with the reference mark (D01 ...).
- Category passes · Recall: reference doors exact with mark. Precision: IfcDoors that match one.
Every wall opening (IfcOpeningElement), paired one to one by centre.
- Opening size and place×389 · Centre, width, base (sill) and top (head).
- Opening host×389 · Voids a submitted wall running the same way as the reference wall.
- Opening filled×389 · Filled by a door exactly when the reference opening is.
- Category passes · Recall: reference openings exact. Precision: submitted openings that match one.
Every declared corner or tee connection (IfcRelConnectsPathElements).
- Connection×2020 · Declared; wall centre lines cross at the joint over the same heights. In-line joins excluded.
- Category passes · Recall: reference connections declared. Precision: extras where walls meet are neutral, else count against.
Every room as an IfcSpace in its storey.
- Room number and name×147 · Name = number, LongName = room name (case, spacing ignored), right storey.
- Room outline×147 · Floor outline of its body, both ways.
- Category passes · Recall: reference rooms exact. Precision: IfcSpaces that match one.
Storeys and grid; passes only if both pass.
- Level×5 · IfcBuildingStorey at its elevation and name; storeys for unplanned levels count against.
- Grid line×42 · IfcGridAxis with its tag; extended line within 1/2 inch of both reference ends.
- Category passes · Recall and precision ≥ 90 % for levels and for grid lines.
Sample Model Trials
- Loses 8 of 13 weight points on 4 of 7 categories: walls (80.9 % of the drawings' walls exact); curtain walls (87.3 % of the drawings' curtain walls exact); wall connections (89.3 % of the drawings' wall connections exact, 75.3 % of its own right); rooms (78.9 % of the drawings' rooms exact, 78.9 % of its own right).
- Walls with their types: Failed: 2247 of the drawings' 2778 walls exact (80.9 %); 2371 of the model's 2606 right (91.0 %); both need 90 %
- Curtain walls: Failed: 96 of the drawings' 110 curtain walls exact (87.3 %); 102 of the model's 102 right (100.0 %); both need 90 %
- + 6 more failed checks
- Loses 7 of 13 weight points on 3 of 7 categories: walls (88.5 % of the drawings' walls exact); curtain walls (88.2 % of the drawings' curtain walls exact); rooms (83.7 % of the drawings' rooms exact, 83.7 % of its own right). All miss the 90 % bar by under 10 points.
- Walls with their types: Failed: 2460 of the drawings' 2778 walls exact (88.5 %); 2530 of the model's 2696 right (93.8 %); both need 90 %
- Curtain walls: Failed: 97 of the drawings' 110 curtain walls exact (88.2 %); 102 of the model's 102 right (100.0 %); both need 90 %
- + 5 more failed checks
- Loses 10 of 13 weight points on 5 of 7 categories: walls (66.3 % of the drawings' walls exact, 81.6 % of its own right); curtain walls (38.2 % of the drawings' curtain walls exact, 56.9 % of its own right); doors (84.2 % of the drawings' doors exact, 84.2 % of its own right); wall connections (76.0 % of the drawings' wall connections exact, 75.6 % of its own right); rooms (57.1 % of the drawings' rooms exact, 57.1 % of its own right).
- Doors with their types: Door D37 (1.30 m x 2.10 m): no model door within 1/2 inch of its centre
- Doors with their types: Door D55 (7.20 m x 3.00 m): no model door within 1/2 inch of its centre
- + 24 more failed checks
Reference Agent Output Failed Checks