Skip to content

IFC export: doors and windows of Core Interior and RE1 Architecture have no OverallHeight/OverallWidth (0 of 143; Revit's export has all) #759

Closed

Description

@Erry91

Problem

On two of the licensed models rvt-rs already measures in CI, no exported door or window carries OverallHeight / OverallWidth, while Revit's own export of the same file has them on every one.

Matched by GlobalId, rvt-rs main at 120e2f9 (0.4.0 gives the same result):

Model Revit Doors + windows matched With OverallHeight and OverallWidth: Revit's export rvt-rs
magnetar 2024_Core_Interior.rvt (reference: 2024_Core_Interior_slim.ifc, IFC4) 2024 138 (132 doors, 6 windows) 138 0
IFC-ECS RE1-Architecture.rvt (reference: RE1-Architecture.ifc, IFC2x3) 2025 5 doors 5 0

Examples from Revit's exports: Core Interior doors 8. × 3. (feet); RE1 doors 2400. × 750., 2400. × 1500., 2339.855… × 1831.870… (mm).

As far as I can tell from element_attribute_tail and RE-93 / RE-94 (#465, #466), the attributes are written only where the type's value block yields Width and Height for the window case (type Width, Height and Default Sill Height) or for doors Revit cuts at their rough size. None of the doors and windows in these two models meet those conditions, so all of them get $. The openings themselves are fine: 138 of 138 voids and fills match Revit's on Core Interior, as #227 records.

For anyone consuming the IFC (door schedules, quantity take-off, accessibility checks on clear width), the size of a door is one of the first things they look for.

Proposed solution

Write OverallHeight / OverallWidth from the type's Width and Height (or the family's own size parameters) whenever they are read, independently of whether the opening is cut from them, and fail closed ($) as today otherwise. If the door types in these models store their size differently from the RE-93 window case (family parameters rather than the BuiltInParameters), that might be the piece to decode.

Alternatives considered

Taking the size from the record box: wrong by the trim width, as RE-93 measured for windows, so not a substitute.

Affected subsystem

ifc (step_writer.rs, element_attribute_tail) and the family-type value blocks (RE-77).

Breaking change

No: attributes that are $ today would get values.

Reproduce

Export both files with RvtDocExporter and write_step, then compare attributes 9 and 10 (OverallHeight, OverallWidth) of every IFCDOOR / IFCWINDOW with the reference export, matching on GlobalId. The files are the ones in research/witness-registry.json (sha256 c805df44… and 4a78bdd6…).

Activity

  1. DrunkOnJava commented on Oct 18, 2026

    @DrunkOnJava
    Owner

    Thank you, the diagnosis is right. OverallHeight and OverallWidth are only written from the opening a filler element cuts (FILLER_OPENING_PROPERTIES, src/ifc/step_writer.rs). That opening exists in two cases:

    • Windows (RE-93): the type's Width (-1001301) and Height (-1001300), placed at its Default Sill Height, and accepted only when the record box holds that rectangle.
    • Doors (RE-94): the type's Rough Width (-1001305) and Rough Height (-1001304), and only where the record box is exactly the Rough Height tall. On Snowdon Towers that held for 57 of 126 doors, the ones Revit cuts at their rough size.

    So the size is tied to the cut, and a door or window whose cut is not read gets $, even when its type's size could be read. On Core Interior and RE1 none of the 143 meet either condition, which matches your count.

    What would resolve it, measured the way you set it up (by GlobalId against 2024_Core_Interior_slim.ifc and RE1-Architecture.ifc, both already in CI's corpus):

    1. Read each door and window type's Width and Height from its value block, independently of the cut. A first check is whether those two built-ins are stored on the door types of these two models at all. Door families often keep their size in family parameters, and those are matched by name, as RE-93 does for Default Sill Height.
    2. Write OverallHeight and OverallWidth from those values whenever both are read, and keep $ otherwise.
    3. Report the count that equals Revit's value per model. Any door where Revit writes something other than the type's Width and Height (the rough size, for example) is a finding in its own right, not something to round away.

    I'm labelling this as a feature on the IFC exporter. If you want to take it, the type value-block reader is partition_type_parameters.rs (type_window_openings and type_door_openings are the models to follow). Otherwise I'll pick it up once the pull requests in review have landed.

  2. added
    type:feature
    on Oct 18, 2026
  3. added
    area:ifc
    priority:P2
    on Oct 18, 2026
  4. Erry91 commented on Oct 18, 2026

    @Erry91
    ContributorAuthor

    Thanks a lot for the detailed pointers, that's really helpful! I'd be happy to take this one.

    I'll start with step 1 only: a small probe that lists, for every door and window type in Core Interior and RE1, which size parameters their value blocks actually hold (the Width/Height built-ins, the rough sizes, and family parameters by name), and compares them with Revit's OverallWidth/OverallHeight by GlobalId. I'll share what it finds here before touching the exporter, including any doors where Revit writes the rough size, as it does on Snowdon Towers.

  5. DrunkOnJava commented on Oct 18, 2026

    @DrunkOnJava
    Owner

    Great, it's yours, and thank you. Starting with the measurement before touching the exporter is exactly right.

    To save you a step: before your comment landed I had started on step 1, so a probe and a scorer are already on branch re/re187-door-window-sizes:

    • examples/probe_re187_door_window_sizes.rs prints one JSON line per door and window: the BuiltInParameters -1001301/-1001300, the rough pair -1001305/-1001304, family parameters named Width and Height, and the record box.
    • tools/re/door_window_sizes_vs_ifc.py joins those rows to Revit's export by Tag and counts which candidate equals OverallWidth/OverallHeight within 0.001 ft, per class.

    A Measure run is scoring them on CI's reference models now (run 39116389615). I'll post its numbers here when it finishes, so you start from the measurement. Use the two files, change them or ignore them, whichever suits you. The finding's number is RE-187, and the exporter change and its report are yours.

  6. DrunkOnJava commented on Oct 18, 2026

    @DrunkOnJava
    Owner

    The Measure run finished (run 39116389615, probe and scorer from re/re187-door-window-sizes). Revit's OverallWidth/OverallHeight against each candidate the type holds, joined by Tag, within 0.001 ft:

    Model Class Matched Width/Height (-1001301/-1001300) Rough pair Family Width/Height
    Core Interior IfcDoor 132 equal 132 not read 132 not read 132
    Core Interior IfcWindow 6 differs 6 differs 6 not read 6
    RE1 Architecture IfcDoor 5 equal 4, not read 1 not read 5 not read 5

    What it shows:

    • Doors: the type's Width and Height built-ins are Revit's OverallWidth and OverallHeight on every door where they're read, 136 of 136, none different. That's the rule to write. RE1's fifth door, 445975 (type 480990), holds none of the three candidates; Revit gives it 6.0101 × 7.6767 ft, which is exactly its record box's width and height.
    • Windows: a measured negative so far. Core Interior's six windows (type 17335) hold 3.3136 × 3.3136 ft in both pairs, while Revit writes 4.9213 × 8.8583 ft. Their record boxes are 6.3208 × 4.9213 × 8.8911 ft, so Revit's width is the box's second extent and its height falls 0.033 ft short of the box. Whether those are storefront or curtain-panel windows sized by their instance is the next thing to look at. Until that's known, windows should keep failing closed.
    • Snowdon's 57 rough-opening doors (RE-94) aren't in CI's corpora, so whether Revit writes the rough or the nominal size on them isn't measured here.

    All yours from here. When you open the PR, the probe and scorer can come with it, renamed or rewritten as you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:ifcpriority:P2type:feature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions