Skip to content

feat(ifc): a stair takes the predefined type its runs and landings give, as Revit's export decides it (#323) - #968

Merged
DrunkOnJava merged 9 commits into
mainfrom
feat/323-stair-types
Oct 25, 2026
Merged

DrunkOnJava merged 9 commits into
mainfrom
feat/323-stair-types

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

A stair's PredefinedType is now the one Revit's export gives it from its runs and landings, where every stair was .NOTDEFINED. or unset: SPIRAL_STAIR, STRAIGHT_RUN_STAIR, TWO_STRAIGHT_RUN_STAIR, QUARTER_TURN_STAIR, HALF_TURN_STAIR, DOUBLE_RETURN_STAIR or THREE_QUARTER_TURN_STAIR. On the BIM4LCA office all 16 stairs of each file have Revit's value, where 2 did, and so do the 5 R2025 stair models. Part of #323.

Motivation

#323 is stairs and their parts as Revit exports them. After #962 typed the flights, the stairs themselves were the remaining PredefinedType gap: Revit's export of the office writes 10 DOUBLE_RETURN_STAIR, 2 STRAIGHT_RUN_STAIR, 1 HALF_TURN_STAIR, 1 SPIRAL_STAIR and 2 NOTDEFINED.

Changes

  • src/native_stairs.rs: RunShape carries each run's m_runType and its climb direction (its first tread's m_runDirProj); stair_predefined_type applies revit-ifc's StairsExporter.GetValidatedStairType rule (CLEANROOM.md source 5) to a stair's runs in ElementId order and its landing count. Three runs each square to the one before with two landings are always DOUBLE_RETURN_STAIR: revit-ifc's flight-path start test holds on all ten office stairs of that layout although their runs' m_bottomElevations differ, and a first rule comparing those wrote all ten TWO_QUARTER_TURN_STAIR.
  • src/partition_schema_mvp.rs: attach_stair_run_shapes groups runs and landings by the stair they aggregate into and sets STAIR_TYPE_FIELD on the stair.
  • src/ifc/export_content.rs: an IfcStair takes it after a predefined type its own export parameters set (RE-45).
  • reports/element-framing/RE-217-stair-runs-2025.md §12, docs/status.md, docs/support-matrix.json (element-records-stair-aggregates, whose note said a stair's own type was not read), changelog.d/added/stair-predefined-types.md (and the flights fragment's "not read yet" sentence dropped).

Testing

Unit tests are banned in this repository: do not add them. Show the change working end to end on real files instead.

  • tools/check-local.sh: CI.

  • Verified end to end on real Revit files. Measure 40175841982, this change against main (51287f2), default models plus -f nordic=true -f r2025=true, predefined_types_vs_ifc and type_objects_vs_ifc:

    model stairs with Revit's PredefinedType
    BIM4LCA office as built (CC BY-SA 4.0) 2 → 16 of 16
    BIM4LCA office at building permit 2 → 16 of 16
    R2025 stair models 13 to 16 (Apache-2.0) 0 → 4 of 4 (STRAIGHT_RUN_STAIR)
    R2025 model 17 0 → 1 of 1 (SPIRAL_STAIR)

    Revit keys a type's second and later type objects by entity and predefined type (B73), so with each stair's value ten more office stair type objects take Revit's GlobalId (12,029 → 12,039 of 12,358 on the as-built file). Only these seven models' IFC changes, and no other scorer's output.

  • Re-measured after the Codex fix (stairs typed after attach_stair_names resolves shared parts): Measure 40177777679 against main (9afafa7), the same counts and the same scorers changed.

  • Witness: Core Interior's export is unchanged (it has no stair runs).

  • Not re-measured: Snowdon Towers (local only).

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/
  • Resolved limitation updated (support matrix, status)
  • Limitation documented: stairs with winders or sketched runs, and layouts the rule does not name, keep .NOTDEFINED. (RE-217 §12)
  • Commit messages describe what changed and why
  • No emojis in code, docs, or commit messages
  • No private paths, personal email addresses, or internal jargon in committed files
  • Finding recorded as RE-217's addendum

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk proprietary content. Clean-room declaration: m_runType and m_runDirProj are read from the file's own schema (Formats/Latest) by native_document; the layout rule is from revit-ifc, the open-source LGPL exporter CLEANROOM.md lists as source 5, read for behaviour, not copied. No Autodesk SDK source, disassembly or NDA material was used.
  • No fixtures

Breaking changes

None. RunShape and native_run_shapes changed shape inside the research surface (unstable-research); stair_predefined_type, STAIR_TYPES and STAIR_TYPE_FIELD are new there.

Screenshots or output samples

IfcStair: 16 in both; same 16, differs 0, unset in rvt-rs 0; Revit's: {'DOUBLE_RETURN_STAIR': 10, 'HALF_TURN_STAIR': 1, 'NOTDEFINED': 2, 'SPIRAL_STAIR': 1, 'STRAIGHT_RUN_STAIR': 2}

Related issues

Refs #323

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 25, 2026 08:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8bf39e4e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/partition_schema_mvp.rs Resolved
@DrunkOnJava
DrunkOnJava disabled auto-merge October 25, 2026 08:43
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 25, 2026 08:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a2e99a017

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ifc/export_content.rs Resolved
@DrunkOnJava
DrunkOnJava disabled auto-merge October 25, 2026 09:47
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 25, 2026 10:01
@DrunkOnJava
DrunkOnJava merged commit db03303 into main Oct 25, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/323-stair-types branch October 25, 2026 10:07
DrunkOnJava added a commit that referenced this pull request Oct 25, 2026
… as retitled (#979)

## Summary

The contribution map's rows for #323, #810, #824 and #878 take their
issues' current titles, and ROADMAP's 0.8.0 paragraph names what each
still owes.

## Motivation

Today's landings narrowed four issues: #968 and #974 left #323 only its
roof parts, #972 left #810 two doors, #975 and #978 left #824 the roof
hatch openings, and #970 left #878 the 2015 elements' GlobalIds. The map
says it lists each open issue "with each issue's own title".

## Changes

- `docs/contribution-map.md`: four rows retitled.
- `ROADMAP.md`: #323 (roof parts), #810 (two doors), #824 (roof hatch
openings).

## Testing

Unit tests are banned in this repository: do not add them. Show the
change working end to end on real files instead.

- [ ] `tools/check-local.sh`: CI.
- [x] Docs only; every map row compared with `gh issue list --state
open`.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [ ] A user-visible change has its entry as a fragment under
`changelog.d/`: not needed, docs only
- [x] Commit messages describe what changed and why
- [x] No emojis in code, docs, or commit messages
- [x] No private paths, personal email addresses, or internal jargon in
committed files

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk proprietary content
- [x] No fixtures

## Breaking changes

None.

## Related issues

Refs #323, #810, #824, #878
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant