Skip to content

IFC class: foundation slabs are written as IfcFooting where Revit writes IfcSlab, and one framing member as IfcBeam where Revit writes IfcMember (#1829) #1841

Closed

Description

@DrunkOnJava

Found by HWT-25's report (#1829) on a confidential Revit 2027 structural model (CHL), read with 0.18.0 and compared element by element with Revit's IFC4 export. Of the 1,925 elements in common, 60 have a different IFC class:

  • 59 foundation slabs (Losa de cimentación): Revit writes IfcSlab, rvt-rs IfcFooting. category_map.rs maps the whole StructuralFoundation category to IFCFOOTING. A foundation slab is a floor in that category, while an isolated or wall footing is a family instance or a wall foundation. So the class has to come from what the element is, not from its category alone.
  • One framing member: Revit writes IfcMember, rvt-rs IfcBeam. rvt-rs maps every StructuralFraming to IFCBEAM. Which property Revit's choice follows (the structural usage, such as a brace, or the family's "Export to IFC As") is not yet known for this element.

To do:

  • Find in Autodesk's open-source exporter (revit-ifc) the rule that sends a floor of the Structural Foundations category to IfcSlab, and with which PredefinedType. Cite the file and class.
  • Read the field that tells a foundation slab from a footing.
  • Measure it on a model whose Revit export holds both. Which of Measure's models do is to be checked; the Autodesk structural samples are the first candidates.

Done when a foundation slab is written with Revit's class and PredefinedType on the measured models, with no footing moved, and the member's rule is either the same or a reported negative.

Activity

  1. added
    area:ifc
    type:bug
    on Nov 12, 2026
  2. DrunkOnJava commented on Nov 12, 2026

    @DrunkOnJava
    OwnerAuthor

    What Autodesk's exporter source (revit-ifc, main) settles, and what it leaves open.

    The framing member (IfcMember). ExporterUtil.GetSpecificCategoryForElement swaps a framing instance's category for a sub-category before the class is looked up, by the instance's structural usage:

    structural usage category looked up
    Brace OST_VerticalBracing
    Girder OST_Girder
    Joist OST_Joist
    HorizontalBracing OST_HorizontalBracing
    KickerBracing OST_KickerBracing
    Other OST_StructuralFramingOther

    So a brace is classed by the bracing category's entry, IfcMember in Revit's class table, not by Structural Framing's IfcBeam. The next step is to find where the framing record keeps its structural usage. It is likely, not yet shown, that the one member in CHL is a brace.

    The foundation slabs. The source does not settle their class:

    • Exporter.cs sends every Floor to FloorExporter.ExportCeilingAndFloorElement, whatever its category. Only a WallFoundation goes to FootingExporter.
    • The floor's class comes from ExporterUtil.GetExportTypeImpl, in this order:
      1. the "Export to IFC As" parameters;
      2. the class table of Revit's export settings;
      3. a short built-in map in ElementFilteringUtil, which holds OST_Floors as IfcSlab FLOOR and has no Structural Foundations entry.
    • So IfcSlab for a floor of the Structural Foundations category comes from the class table, the one Revit ships or a user's, not from code that can be cited. An export made with another table could write IfcFooting. That is the exporters-disagree case, and the standing rule is to leave out what they disagree on. Here that would mean not changing the class until a second Revit export shows which table is the default.

    The PredefinedType, once the class is IfcSlab, is in the source (FloorExporter.cs, the IfcSlab case): BASESLAB where the floor's analytical counterpart is analysed as slab-on-grade or mat, otherwise FLOOR. CHL's export would show which of the two its 59 slabs carry.

    What would settle it. A second Revit IFC4 export, made with Revit's default class table, of any model holding a floor in the Structural Foundations category. None of Measure's models with a Revit export is known to hold one; that is checked next. @HWT-25, if your export used Revit's default class mapping, saying so (and which PredefinedType the 59 carry) would answer the first half.

  3. DrunkOnJava commented on Nov 12, 2026

    @DrunkOnJava
    OwnerAuthor

    Checked: none of the 84 models Measure scores against a Revit export holds a footing. In Measure run 43301498228, no model's class_sets_vs_ifc output names IfcFooting in Revit's export or in rvt-rs's, the held-out models included. Core Interior's and RE1's Revit exports hold no BASESLAB either. So the foundation-slab class can be measured only on a new model: CHL's export, or another structural model that comes with a Revit IFC4 export. The member rule can be read without one, by finding the structural usage in the framing record.

  4. DrunkOnJava commented on Nov 12, 2026

    @DrunkOnJava
    OwnerAuthor

    The member's field: InsertableInst.m_structUsage, a 4-byte integer in the schema of a Revit 2025 file. A framing instance's structural usage is the obvious candidate for what revit-ifc reads. What each value means must come from byte observations, not the API's enumeration, and no measured model has one to observe. In every model Measure scores, every element Revit writes as IfcMember (mostly mullions) rvt-rs writes as IfcMember too (run 43301498228's class_sets_vs_ifc), so none has a framing member that Revit's export moves to IfcMember. The way through is CHL: a probe that prints, for each Structural Framing instance, its m_structUsage value and its Tag (or counts per value only, if Tags are too much), compared with Revit's class for it. #1851 lets HWT-25 run such a probe without a toolchain.

  5. DrunkOnJava commented on Nov 13, 2026

    @DrunkOnJava
    OwnerAuthor

    @HWT-25, thank you: your two answers on #1829 (13:44 UTC) settle what #1841 was waiting for.

    • The member. Structural usage 8 (your API reading: Horizontal Bracing) is the one framing instance Revit writes as IfcMember; 3 (Girder, 485) and 6 (Other, 429) it writes as IfcBeam. That is the mechanism the exporter's source gives (a bracing usage swaps the category for the bracing sub-category, whose class in Revit's table is IfcMember), now with the value observed. The samples we hold carry the values 3, 4, 5 and 6, all IfcBeam in rvt-rs, and no Revit export of them, so value 8 is the only one this moves.
    • The slabs. Revit's default class mapping puts a floor of the Structural Foundations category in IfcSlab, with BASESLAB on the type and nothing on the occurrence, which is what your 59 show. The exporter's source sends every floor to the floor exporter whatever its category, and only a wall foundation to the footing exporter. So the class has to come from what the element is.

    I am now reading what in the file tells a floor in that category from a footing, on the models we hold, and then both rules are written with rows registered here first. Neither can be scored against a Revit export of ours (none holds a foundation slab or a bracing member), so what each must not move is measured on our models (no IfcFooting that is a footing, and no IfcBeam whose usage is not 8, changes class) and your counts after the release are the check. One question for the member: its PredefinedType in your export, if you can read it (BRACE, USERDEFINED, or none).

  6. DrunkOnJava commented on Nov 13, 2026

    @DrunkOnJava
    OwnerAuthor

    Rows for the foundation-slab change, registered before its Measure is dispatched. The change is on branch fix/1841-foundation-slab (458d315f): a floor of the Structural Foundations category, which its record names as the class Floor, is written as IfcSlab with BASESLAB; a family instance or a ContFooting of the category stays IfcFooting. On Revit 2027 the occurrence then carries no PredefinedType and its type object carries BASESLAB, as your 59 do, by the rule that already leaves it off the slabs of that release.

    No model Measure holds with a Revit export has a foundation of any kind, so the rows are about what the change must not move, and about the files that hold the case:

    1. Snowdon Towers Structural's 4 floors of the category (RevitClass Floor, category Structural Foundations) go from IfcFooting to IfcSlab, BASESLAB on the occurrence (a Revit 2024 file), with the same GlobalIds, placements and bodies. Its 86 other IfcFooting (77 family instances, 9 ContFooting) stay.
    2. rst_basic keeps all of its 36 IfcFooting (32 family instances, 4 ContFooting) on every save.
    3. No other export changes. Of the 146 exports of the unfiltered Measure, the ones that differ are Snowdon Towers Structural and any other file with a floor in that category; any other is read before anything else. No scorer line of a model with a Revit export moves.
    4. What the 4 gain or lose besides their class (quantities, property sets, a type object) is read from the kept exports of both sides and reported here.
    5. The same-project gates pass.

    Your counts after the release are the check on the model that holds 59 of them: IfcSlab for each, none left as IfcFooting, BASESLAB on their types.

  7. HWT-25 commented on Nov 13, 2026

    @HWT-25

    The member's PredefinedType: in Revit's export of the same save, the IfcMember carries $ on the occurrence, and its IfcMemberType (the only one in the file) carries BRACE. That is the same pattern as the 59 slabs.

  8. 7 remaining items

  9. HWT-25 commented on Nov 14, 2026

    @HWT-25

    On 0.22.0 both counts hold.

    • The 59 foundation slabs are all IfcSlab, with no PredefinedType on the occurrence. Their IfcSlabType
      carries BASESLAB. None is left as IfcFooting, and the other 88 IfcFooting are the ones Revit's export also
      writes as footings.
    • The framing: 1 IfcMember and 914 IfcBeam. The member is the one Revit writes as IfcMember. Its
      IfcMemberType carries NOTDEFINED where Revit's carries BRACE, as your notes say.
    • The IFC class now matches Revit's export on all 2,355 elements in common (2,295 on 0.21.0).

    Time and memory are unchanged. Default export, two runs of each version in turn, same flags: 0.21.0 took 20.4 and
    20.2 s, and 0.22.0 took 19.8 and 20.4 s. The peak working set was about 1.15 GB on all four.

  10. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    A second measurement for the foundation-slab rule, found while reading batch 10's note that it was measured only on the 2027 CHL save. Revit's own 2018 export of rac_basic (the public file, not committed) writes its one foundation slab, 766598 (Foundation Slab:150mm Foundation Slab:766598), as an IFCSLAB with .BASESLAB., and holds no IFCFOOTING at all. So an older exporter, on a project of another release, gives the class the rule writes for a foundation slab on every release, and the rewrite the rule makes on rac_basic's 2024 save (one floor) and on Snowdon Towers Structural's four floors (no Revit export of those exists) is the class Revit writes where it can be checked. What is still to do on the issue is the bracing member: its IfcMemberType carries BRACE in Revit's export where rvt-rs writes NOTDEFINED, and the narrower fix is the value on the type object only, since setting it on the class would also write .BRACE. on the occurrences of 2024 to 2026, which no export measures.

  11. added
    priority:P2
    on Nov 14, 2026
  12. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    @HWT-25, the last part of this issue shipped in 0.23.0, and it is also in 0.24.0 (#1968). On Revit 2027, a horizontal bracing's IfcMemberType now carries PredefinedType BRACE. Its IfcMember occurrence still writes none, which is what you found Revit's export does. No model we can fetch holds a bracing, so the value has only been checked as far as "nothing else moves" (Measure 43544392778, every export identical).

    When you next run CHL, one line would let me close this. Counts only, as before: on 0.24.0, the PredefinedType of the IfcMemberType that the one IfcMember is typed by. The other rows you confirmed on 0.22.0 (59 foundation slabs as IfcSlab with an IfcSlabType BASESLAB, and the class matching on every element in common) should be unchanged, and a mismatch on any of them would be worth a line too.

  13. HWT-25 commented on Nov 15, 2026

    @HWT-25

    On 0.24.0: the bracing's type is BRACE, and the other rows hold.

    Default export of 0.24.0 on the same save and Revit export as my last posts. The .rvt and the IFC hashes are the
    same before and after.

    • The member: the one IfcMember is typed by an IfcMemberType whose PredefinedType is BRACE, and the
      occurrence carries none, as in Revit's export.
    • The foundation slabs: the 59 are IfcSlab with no PredefinedType on the occurrence and an IfcSlabType
      BASESLAB, as before and as Revit writes them.
    • The class matches Revit's export on all 2,363 elements in common (this save holds a few more elements than the
      one I ran 0.22.0 on). 914 IfcBeam and 88 IfcFooting in both.

    One mismatch, small, for whoever it belongs to: the 14 stair landings (the IfcSlab that are parts of their
    IfcStair) have no type object in rvt-rs's export, where Revit's types each by an IfcSlabType LANDING. The other
    slabs in common agree on their type's PredefinedType (59 BASESLAB, 26 FLOOR).

  14. DrunkOnJava commented on Nov 15, 2026

    @DrunkOnJava
    OwnerAuthor

    Thank you, @HWT-25. That is the last row. On 0.24.0:

    • the bracing's IfcMemberType carries BRACE and its occurrence carries none, as in Revit's export;
    • the 59 foundation slabs are IfcSlab typed BASESLAB;
    • the class matches on all 2,363 elements in common.

    So both halves of this issue hold on CHL, and on rac_basic's own 2018 export for the slab. Closing it as done.

    The stair landings you found are tracked in #2046. On Revit 2024 the landings' types already match: Snowdon Towers Architectural types 17 of its 20 landings by an IfcSlabType LANDING in both Revit's export and ours. So the gap looks specific to the 2027 save or to CHL's kind of landing. When you next run CHL, one count would help there: how many of the 14 landings are monolithic or sketched, if your viewer shows it.

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

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