Skip to content

IfcOpenShell 0.9: Measure's scorers lose their file and cannot mesh walls #773

Closed

Description

@DrunkOnJava

IfcOpenShell 0.9.0 (proposed in #769) keeps CI's witness job green but breaks Measure's scorers, so CI stays on 0.8.5 until they are migrated.

What was measured

Measure ran twice on the same rvt-rs commit (6a7cf62), changing only IfcOpenShell:

Of the 171 output files, 153 are byte-identical and the six rvt-ifc.log files differ only in their timing line. Seven scorers differ:

Scorer 0.8.5 0.9.0
room_names_vs_ifc Core Interior 116 of 116 rooms, RE1 Architecture 11 of 11 Core Interior: core dump (exit 139). RE1: RuntimeError: Instance #1692 not found in ifcopenshell.util.element.get_psets
wall_bodies_vs_ifc 360 of 360 Core Interior walls compared, 7 of 7 on RE1 every wall "IfcOpenShell cannot mesh the IFC wall"
wall_ends_cv_vs_ifc 720 of 720 Core Interior wall ends within 0.001 ft every wall unmeshable
wall_layers_vs_ifc 319 Core Interior walls compared none
layer_sets_vs_ifc 407 of 407 Core Interior layer sets, 15 of 15 on RE1 320 (Core Interior) and 7 (RE1) "IfcOpenShell cannot mesh Revit's element"
slab_layers_vs_ifc 68 of 68 Core Interior slabs 1 unmeshable, 67 of 67
plan_profiles_vs_ifc 100 Core Interior elements 99

In CI's IfcOpenShell job under 0.9.0 the exports still validate, and both Core Interior edges' IfcOpenShell observations replay unchanged. The counts witness is unaffected; the geometry and property scorers are not.

Two causes

  1. Instances outlive their file. Eight ifcopenshell.open(path).by_type(...) calls in five scorers never bind the file: room_names_vs_ifc.py (lines 25 and 79), names_vs_ifc.py (67, 72), wall_materials_vs_ifc.py (66, 71), room_areas_vs_vim.py (64) and instances_vs_ifc_tags.py (32). 0.9.0's new instance model holds the file weakly, so the file is freed while its instances are still in use, which matches the Instance not found error. A function that opens a file into a local and returns its instances has the same problem. The fix is to keep the file bound for as long as its instances are used, which changes nothing under 0.8.5.
  2. Walls do not mesh. wall_bodies_vs_ifc.py keeps its file for the whole run (line 134) and ifcopenshell.geom.create_shape still fails on every wall, in rvt-rs's export and, through layer_sets_vs_ifc, in Revit's own. The scorers count the exception without recording it (lines 147 to 150), so the cause is not known yet. The first step is to record the exception text per element and run Measure under 0.9.0 again.

Done when

Measure under 0.9.x gives the same scorer outputs as under 0.8.5 on the same commit, apart from timings. Then the pin in tools/ci/requirements-ifc.txt moves, with the IfcOpenShell observations and verdicts under research/witness/ refreshed, and Dependabot's hold on IfcOpenShell minor updates is removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cipriority:P3type:ci

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions