← All tasks
BIM 02Visual PerceptionDrawing Interpretation3D Spatial Reasoning

Model a 3-storey school BIM from drawings

Tools
IfcOpenShell, PyMuPDF, NumPy, Pillow
Time limit
8 hours

Agent is asked to build the BIM model of a three-storey school with four linked wings and a round-cornered pavilion, from its drawing set.

Agent Input

What the agent is given: the instruction and its input files.

instruction.md

Task: build the building from its drawings

You are given the drawings of Building C, a three-storey school building with a roof level: four linked wings, about 100 m by 36 m, with one wing turned at an angle and a round-cornered pavilion. 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 10 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 (Level 1, Level 2, Level 3, Roof, Upper Roof): walls with their heights, their wall types and layers, doors with their door types, windows with their window types, the openings cut in walls (door openings and window openings), wall connections, stairs, rooms and floors. 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 ...); next to the mark of an opening that holds a window, the window's type mark in orange (WN03 ...); a stair's flights and landings are outlined in purple with its mark (S1 ...); a room carries its number and name. The legend column at the right of each plan explains the marks and tabulates them.
  • 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.
  • 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, and D03[1450x3125] gives the frame size of a door whose mark has several.
  • Windows. A window stands in the opening whose mark it is written next to, centred in the opening's width and in the wall's thickness. Its frame width and height are the ones the plan's legend gives for its type mark; those are graded. Its sill is its opening's sill unless its mark says otherwise: WN03[+100] sits 100 mm above the opening's sill, and WN03[2400x2900] gives the frame size of a window whose mark has several. The window schedule lists every window of the model; only a window with a mark on a plan is asked for, and where the schedule and a plan's legend differ, the legend is the graded one.
  • Floors. Every floor is outlined in brown on the plan of its storey, holes included (a closed brown line inside an outline is a hole through it), with its mark (F01 ...) inside it. The legend's FLOORS table gives each mark's thickness and the height of its top, in mm from the plan's level.
  • 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.
  • Types. A-501 gives every wall type's layers; the schedules count the types.

Graded exactly:

  • Wall types. Every IfcWall has an IfcWallType whose Name begins with its type mark (W01 ...), with its layers as an IfcMaterialLayerSet, each LayerThickness within 1.5 mm of sheet A-501.
  • Door types. Every IfcDoor has an IfcDoorType whose Name begins with its type mark (D01 ...).
  • Window types. Every IfcWindow has an IfcWindowType whose Name begins with its type mark (WN03 ...).
  • Rooms. Every room an IfcSpace aggregated by its storey: Name its number, LongName its name, a body whose floor outline runs along the inside faces of the walls (and of the structure drawn for reference) that bound it. The brown floor outlines mark floors, not rooms: a room runs to the inside faces of its walls. Where a wall line has a gap with no opening and no wall beyond it, the room closes across the gap on the line of the wall's inside face.

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 J, x runs along grid J toward grid 14, 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 IfcGridAxis of an IfcGrid: AxisTag the tag in its bubble, AxisCurve a straight line (an IfcPolyline of two points) along it, in the same coordinates as everything else. How far you draw a line does not matter.
  • Spatial structure. One IfcProject, IfcSite and IfcBuilding; one IfcBuildingStorey per level that has a floor plan, with its Elevation from the level table on G-001.
  • Which storey. A wall, a door, a window or a stair belongs to the storey it starts on: the highest level at or below its base (a base up to 300 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 Body representation: 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, ATEND or ATPATH). Joins between two pieces of one wall in line are optional.
  • Openings: every marked opening, as an IfcOpeningElement that voids its wall (IfcRelVoidsElement). Its body gives its centre, width, sill (base) and head (top). An opening that holds a window is graded as an opening; the window in it is graded as a window (below).
  • 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.
  • IfcWindow: every window the plans mark, one element per opening, filling its opening (IfcRelFillsElement) and contained in its storey. Its body, the size of its frame, gives its centre, sill (base), width and height.
  • IfcStair: one per storey it climbs, contained in the storey it starts from, aggregating its IfcStairFlights and landings. Each purple outline on the plan is one part: model each as its own flight (or landing slab) with that plan outline, between the two levels the stair table gives. The parts' plan outlines and the two levels are read; riser counts are not.
  • IfcSlab (PredefinedType FLOOR): every floor outlined in brown, contained in the storey of the plan that outlines it, with a body that is its outline (holes as voids of the profile, or cut by openings) extruded from its top down by its thickness. The outline of its upward faces seen from above (with its holes), its base and its top are read. Split it into pieces, or join floors that meet at the same heights, as you like: floors are compared as solids. Stair landings are the stairs', not floors.

Curtain walls, glazing, 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;
  • 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 window when its centre, width, height and sill are, in the right storey, filling the right opening of the right wall, with an IfcWindowType whose name begins with the real window's mark;
  • 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 stair when the outline of its flights and landings, and the levels it connects are, in the right storey;
  • a room when a space has its number, name and storey, and its floor outline is within the tolerance both ways;
  • a floor when its solid is: its outline and holes, its top and its thickness within the tolerance, in the right storey.

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.

/app/sheets/A-102.png

Grading & Reference Solution

How the submission is scored, and a human expert-authored reference solution.

rubric

Gates

G1Model opens
Pass / fail

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

C1Walls with their types
20%

Every wall as a 3D solid, with its type mark and layers.

  • Wall solid×864 · 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×864 · Every wall along it has an IfcWallType Name starting with its mark (W01 ...).
  • Wall layers×864 · 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.
C2Doors with their types
13.3%

Every door, paired one to one with the nearest submitted door.

  • Door size and place×110 · Frame centre, width, height and base, in the right storey.
  • Door host×110 · Fills an opening (IfcRelFillsElement) of the wall it stands in.
  • Door type mark×110 · IfcDoorType Name starts with the reference mark (D01 ...).
  • Category passes · Recall: reference doors exact with mark. Precision: IfcDoors that match one.
C3Openings
13.3%

Every wall opening (IfcOpeningElement), paired one to one by centre.

  • Opening size and place×215 · Centre, width, base (sill) and top (head).
  • Opening host×215 · Voids a submitted wall running the same way as the reference wall.
  • Opening filled×215 · Filled by a door exactly when the reference opening is.
  • Category passes · Recall: reference openings exact. Precision: submitted openings that match one.
C4Wall connections
6.7%

Every declared corner or tee connection (IfcRelConnectsPathElements).

  • Connection×589 · 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.
C5Stairs
6.7%

One IfcStair per storey it climbs, with its flights and intermediate landings.

  • Stair outline×11 · Plan outline of flights and mid landings, both ways; no floor landing inside.
  • Stair levels×11 · Base and top, and the storey it starts from.
  • Category passes · Recall: reference stairs exact. Precision: IfcStairs that match one.
C6Rooms
13.3%

Every room as an IfcSpace in its storey.

  • Room number and name×84 · Name = number, LongName = room name (case, spacing ignored), right storey.
  • Room outline×84 · Floor outline of its body, both ways.
  • Category passes · Recall: reference rooms exact. Precision: IfcSpaces that match one.
C7Windows with their types
6.7%

Every window, paired one to one by centre.

  • Window size and place×69 · Frame centre, width, height and sill, in the right storey.
  • Window host×69 · Fills (IfcRelFillsElement) a wall opening at the reference opening's centre.
  • Window type mark×69 · IfcWindowType Name starts with the reference mark (WN03 ...).
  • Category passes · Recall: reference windows exact. Precision: IfcWindows that match one.
C8Floors
13.3%

Every floor slab (IfcSlab FLOOR), compared as a solid.

  • Solid×147 · Top-face outline with holes, base and top, covered within 1/2 inch, nothing extra; right storey; splits OK.
  • Category passes · Recall: reference floors exact. Precision: submitted floors within 1/2 inch of them.
C9Levels and grid lines
6.7%

Storeys and grid; passes only if both pass.

  • Level×5 · IfcBuildingStorey at its elevation and name; storeys for unplanned levels count against.
  • Grid line×38 · 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

Claude Fable 5.20.667
Walls with their typesDoors with their typesOpeningsWall connectionsStairsRoomsWindows with their typesFloorsLevels and grid lines
Claude Fable 5.2's level 1 on the true design, with its failed checks in red
  • Loses 5 of 15 weight points on 2 of 9 categories: walls (89.1 % of the drawings' walls exact); rooms (89.3 % of the drawings' rooms exact). Both miss the 90 % bar by under 2 points.
  • Rooms: Room 145 Infant Room: outline more than 1/2 inch off the drawings', up to 201 mm at its furthest (area 72.0 m², the drawings' 72.2 m²)
  • Rooms: Room 141 Toilet: outline more than 1/2 inch off the drawings', up to 284 mm at its furthest (area 71.7 m², the drawings' 72.0 m²)
  • + 11 more failed checks
GPT-6.2 Astra0.667
Walls with their typesDoors with their typesOpeningsWall connectionsStairsRoomsWindows with their typesFloorsLevels and grid lines
GPT-6.2 Astra's level 1 on the true design, with its failed checks in red
  • Loses 5 of 15 weight points on 2 of 9 categories: walls (88.9 % of the drawings' walls exact); rooms (89.3 % of the drawings' rooms exact, 89.3 % of its own right). Both miss the 90 % bar by under 2 points.
  • Rooms: Room 145 Infant Room: outline more than 1/2 inch off the drawings', up to 199 mm at its furthest (area 72.1 m², the drawings' 72.2 m²)
  • Rooms: Room 141 Toilet: outline more than 1/2 inch off the drawings', up to 282 mm at its furthest (area 71.7 m², the drawings' 72.0 m²)
  • + 10 more failed checks
Gemini 4 Neon0.60
Walls with their typesDoors with their typesOpeningsWall connectionsStairsRoomsWindows with their typesFloorsLevels and grid lines
Gemini 4 Neon's level 1 on the true design, with its failed checks in red
  • Loses 6 of 15 weight points on 3 of 9 categories: walls (38.1 % of the drawings' walls exact, 73.6 % of its own right); wall connections (61.8 % of the drawings' wall connections exact, 70.7 % of its own right); rooms (28.6 % of the drawings' rooms exact, 28.6 % of its own right).
  • Rooms: Room 102 Substation: outline more than 1/2 inch off the drawings', up to 88 mm at its furthest (area 30.3 m², the drawings' 30.4 m²)
  • Rooms: Room 138 Nursing Room: outline more than 1/2 inch off the drawings', up to 24 mm at its furthest (area 16.5 m², the drawings' 16.6 m²)
  • + 24 more failed checks

Reference Agent Output Failed Checks