Skip to content

Diagnostics count pieces folded into another element's body as exported elements (47 extra IfcCovering on the BIM4LCA office) #1424

Closed

Description

@DrunkOnJava

From #1417 and #1422 (PRs #1421, #1423).

exported.by_ifc_type and exported.building_elements count the pieces the writer folds into the body of another element (Placement::Folded, #823), which the IFC does not write as elements. So the diagnostics report more elements than the file holds.

Measured on the BIM4LCA office (Measure run 41977947391, head 2fc83c4):

File by_ifc_type IFCCOVERING In the IFC (and Revit's export) building_elements Rows the MCP server lists
As built 158 111 13,021 12,974
At permit 122 75 13,067 13,020

The difference is 47 on each file. docs/export-diagnostics.md describes by_ifc_type as the "count of exported building elements grouped by STEP entity type", which these counts are not. The MCP server's list, the elements CSV (#1421) and the viewer's panels (#1423) follow the writer, so each is 47 below the diagnostics on these files. No other reference model has a folded piece, so this shows on no other file measured.

viewer/tests/journey.spec.ts compares the elements CSV with both fields, per IFC type. It passes today because none of its models (Einhoven, Core Interior, RE1 x4) has a folded piece, so it would fail on a model that does.

Done when:

  • exported.by_ifc_type and exported.building_elements count what step_writer::placements says is written, and exported.body_pieces_folded (or an equally named field) counts what was folded, so the two reconcile.
  • docs/export-diagnostics.md and docs/schemas/export-diagnostics.schema.json say so.
  • An unfiltered Measure shows the two office files moved by exactly 47 and no other model's counts moved, and any pin of these counts (tests/fixtures/project-counts/, the MCP scorer's reconciliation in tools/re/mcp_answers_vs_ifc.py) moves with a dated note.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ifcpriority:P2type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions