Repository navigation
Description
Finding (RE-30, #290)
On Autodesk's Snowdon Towers 2024 sample projects, most partition element records in every recovered category use a second prologue. The frame is in place, byte-identical in shape to an RE-21 record from the BuiltInCategory at +0x12 through the bounding-box marker at +0x50, but +0x00 holds no ElementId. The fail-closed decode therefore rejects them.
| file | recovered-category frames | decode | second prologue | undeclared id |
|---|---|---|---|---|
| Snowdon Towers architectural | 2,171 | 7 | 2,043 | 121 |
| Snowdon Towers structural | 106 | 26 | 75 | 5 |
2024_Core_Interior.rvt (recorded edge) |
2,875 | 2,857 | 0 | 18 |
Since #293, exports count these frames per class as skipped reason element_record_without_element_id and put an incomplete-model warning first.
What is ruled out
+0x00: holds0xFFruns and 16-bit words (0x03c1,0x07eb,0x04fe,0x066f).- The last reference slot: on decodable records it is the record's own id. On 1,216 second-prologue walls it takes only 605 distinct values.
- A fixed offset before the record: every even offset from −512 to
+0x12across 1,989 frames; the best holds a declared id on 128. - Save increments for the 16-bit words: the files report 71 and 22.
What would unblock it
An oracle: a Revit 2024+ project that uses this prologue, together with Revit's own IFC export of it with element Tags on. Matching bounding boxes to Tags would give the id each frame should carry. The bytes can then be searched for it.
Possibly useful without an oracle:
Global/ElemTable's owner field (RE-31, feat(elem-table): read the owner ElementId every record carries (#152) (RE-31) #294) links curtain panels, mullions and grids to their wall.- Second-prologue frames carry reference lists whose every slot is declared (1,200 of 1,216 walls).
References
reports/element-framing/RE-30-snowdon-generalisation.mdreports/element-framing/RE-31-elemtable-owner-field.md- Sample hashes are in RE-30. The files are Autodesk's, kept local and never committed.
Activity
DrunkOnJava commentedon Sep 22, 2026
An oracle was found, and it narrows the problem (#297, RE-30 §7).
bldrs-ai/test-modelshas the architectural.rvt, byte-identical to ours (sha25633271010…), plus Revit 2024's own IFC4 export of it (sha256ecfcb04e…), with an ElementIdTagon every element. It is used locally only, because that repository has no licence.IfcWallby box.+0x88, and nowhere else nearby.So the id isn't missing. What's missing is the rule for which slot is the element itself. On decodable records it's the last slot only because the element is the newest id in its list.
Ruled out as the selector so far:
Global/ElemTablerow field (best 388 of 1,028);Next candidates: the second prologue's own 16-bit words (
+0x0c,+0x0e, and the words before+0x00) read as a slot index or count into the list, and per-category differences once doors, windows and floors are matched the same way.Edited 2026-11-15: absolute Snowdon Towers figures (positions, elevations, areas) are removed. The Snowdon files measured here have no licence, so only counts, lengths and differences from them are published.
docs(re-30): rule out an in-frame slot index as the selector (#295)
docs(re-30): the own id is in the reference list for doors, windows, …
docs(re-30): rule out ElemTable owner links as the selector (#295)
docs(re-30): the class-A ElementId is in the frame's reference list (#…
docs(re-30): record the leading-slot and context-id guard variants (#295
docs(re-30,re-31): element frames sit in ElementId order; owner self-…
feat(elements): decode Revit 2025 element records with a per-release …
fix(ifc): scale export readiness by the records it could not export (…
feat(elements): thirteen more product categories from element records…
DrunkOnJava commentedon Sep 23, 2026
#313 (RE-34) resolves this for every category except sketch-owning elements.
The rule: take the longest rising chain of ids through a partition twice, with ties resolved toward smaller and toward larger ids, and keep an id only when both agree. It considers placed instances only, and never takes context ids named by 56 or more frames. Hidden-id hold-outs make 0 wrong picks: 3,458 correct on Core Interior, 445 on Snowdon, and 41, 7 and 36 on the RE1 models. Snowdon Architectural exports 4,245 elements instead of 80.
Still open here: floors, building pads and ceilings. Their lists name the sketch at id − 1, and the order rule cannot tell the two apart. One idea measured on Snowdon's 190 second-prologue floors: take the candidate that some sketch-line record names as its owner (the RE-25 second-list slot). That gives 71 correct and 10 wrong, and 96 frames have several owned candidates, so it is not a rule yet.
feat(elements): infer second-prologue ElementIds from reference order…
feat(ifc): name inferred ElementIds in the element-record property se…
DrunkOnJava commentedon Sep 23, 2026
Floors and ceilings in the second layout, measured 2026-09-22. Still no rule; recording what fails and why.
Owner-restricted, decoupled second pass. RE-34's chain runs unchanged. Then each floor, pad or ceiling frame gets an id only if exactly one candidate lies strictly between its neighbours' final ids and is named as owner by some sketch-line record (RE-25's second-list slot).
IfcCoveringTagin their list. Of the floor picks, 162 are exported slab Tags, 86 of them the only one in their list. 14 are wrong: the pick is the sketch (F − 1) beside an exported slab F, e.g. 1394725 / 1394726. On Snowdon some sketch-line records name the sketch itself as owner, not the sketched element, so the owner filter lets the sketch through.The hold-outs could not catch it: Snowdon's real floors are all second-prologue, and on Core the owner slot always names the floor.
Next: something that separates a sketch from its sketched element on Snowdon, before any floor or ceiling is assigned. A rule that only happens to be clean for ceilings on one file is not shipped.
fix(partitions): read second-prologue ElementIds from the enclosing p…
feat(elements): export structural framing, columns, foundations and g…
fix(elem-table): declare the ElemTable's second id where the two ids …
DrunkOnJava commentedon Sep 23, 2026
Solved.
Partitions/*stream opens with a chain of ElementId-keyed records (u64 id · u32 size · u16 constant · u16 count, body, 16-byte trailer). A second-prologue frame sits inside its element's record, so its id is the enclosing record's.+36of their ElemTable record (id_secondary), not at+16.u32::MAX(the invalid id −1) are second-prologue frames too.On Snowdon Towers Architectural,
element_record_without_element_idis now absent. rvt-rs exports 6,045 elements, 5,945 of them in Revit's own IFC4 export: every element Revit exports in the entities rvt-rs writes. The other 100 are Revit's own omissions (#309).docs: Snowdon Towers figures are given as counts, lengths and differe…