Repository navigation
Conversation
…40-byte layout (RE-175, DrunkOnJava#85) detect_layout took a record size only if every id rose across the whole table. Six large Revit 2025 models (Snowdon Towers Architectural and Structural, two Autodesk Japan samples, two Golden Nugget models) hold 2 to 163 records out of order among 16,612 to 50,529, so they fell back to the 12-byte implicit layout. parse_records then returned 12-byte slices of 40-byte records as ElementIds, and rvt-ifc wrote 0 or 1 building elements and a 2 to 4 KB file. Each of them fits 40-byte records exactly (the stated count from 0x06, then the same 24 trailing bytes as the models detected before), with 0.004% to 0.37% of the ids out of order, against 63% to 66% at 28 bytes. A record size is now accepted when its ids rise on all but 1% of the steps (MAX_OUT_OF_ORDER_PERCENT). Under 100 records that is none, as before. Over 174 local models exactly the 12 paths of those six change, to 40 bytes, and 162 keep their layout. rvt-ifc on the six, with and without this change on f822dc6: 0 to 1 building elements become 1,282 to 6,035, and the IFC 1.8 to 3.6 KB becomes 2.4 to 16.9 MB. Adds reports/element-framing/RE-175-large-elemtable-layout.md. No test: none of the six is in CI's corpora, and elem_table_corpus keeps pinning the layouts that are. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PTF9zY65eLo8xChgx95ZjG
Owner
|
Thank you for this, and sorry it waited two weeks: CI never ran because GitHub holds a first-time contributor's runs until a maintainer approves them, and nobody was watching the queue. #737 landed today and fixes the same fallback differently. It tests the ElementId, the record's second id, instead of the first. On the Snowdon Towers 2024 tables pinterbanget measured, the first id breaks its order exactly on records where it differs from the second, and the second id rises strictly on every table measured, so no tolerance is needed there. This PR changes the same lines with a tolerance on the first id, so it now conflicts with Two parts are worth keeping:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Research for #85. It tests the issue's idea that the repeated-number triples
(N,N,N)inGlobal/ElemTablemark kinds of project resource (Level, Material, Space and others), and finds that they do not. It adds one probe (examples/probe_re174_symmetric_tuples.rs) and one report (reports/element-framing/RE-174-symmetric-tuples.md). No library or exporter code changes.In plain terms: every element has a small table row holding three numbers. #85 read the rows where all three numbers are equal as a label for the kind of element. They are not labels. They are the element's history, three save-episode numbers (when it was created, last modified, last modified by a user), and equal numbers just mean "created in one save and not touched since".
Motivation
#85 asked for a sweep of every
(N,N,N)tuple, a mapping of each to a class, and at least two new classes confirmed at 90% purity. The earlier 0.2.0 readings (Level(8,8,8), Material(20,20,20), Space(25,25,25)) were the basis. A wrong tuple-to-class table would mislabel elements on every model but the one it was read from, so it was worth testing before building on it. Refs #85.What was found
ElemRec, with four members:m_history,m_id,m_OwningElementId,m_partitionId. The triple ism_history:m_creationDate,m_lastModificationDate,m_lastUserModificationDate.native_indexalready reads them ascreation_episode,stored_revisionandother_revision. On 651,264 of 651,264 records they match. That match says what the numbers are, but it is by construction, since both read the same bytes, so it is not the evidence against the class idea.(0,0,0)has 2,051 records of four classes. One class has many tuples:MaterialElemRoomElemLevelrac_basic,rst_basic, RE1,rme_basic),(8,8,8)is on none of the symmetric Levels,(20,20,20)on none of the symmetric Materials (17 to 82 per model) and(25,25,25)on none of the Rooms. I cannot reproduce them, and the tool that read them is not in this repository, so how they were derived is not known here.Consequence: #85's acceptance criteria cannot be met this way, and no mapping is added to
ProbableClass(the fileelem_table_class.rsno longer exists). A record's class is already in its own body tag.Changes
examples/probe_re174_symmetric_tuples.rs: the probe. For each file it prints how many records have exactly the numbersnative_indexcalls the history, each symmetric tuple of 20 or more records with its classes and purity, and each class of 20 or more records with how many tuples it spreads over. One JSON line each.reports/element-framing/RE-174-symmetric-tuples.md: the dated report, with status (negative for the issue's premise), method, results, limits and how to reproduce.How it was measured and how to reproduce it
Models: 47 distinct local models of Revit 2019 to 2027. 32 of Revit 2023 to 2027 have a class oracle (3, 3, 18, 2 and 6 per release); 15 of 2019 to 2022 are read for their tuples only. They are Autodesk's published samples, Snowdon Towers, Golden Nugget, RE1 Architecture (MIT, as pinned in
ci.yml), Core Interior and Einhoven (magnetar-io, MIT),02_2025.zipfrom #356 (Apache-2.0, sha2568673d803fb0b9b6aa20d08448eeed16eb34222566bfaf7a2dc761c064dc30d6a), and a few models made for other issues. Some of them are local-only and not redistributable, as with RE-40's Snowdon results, so the report holds their numbers rather than the files.Limits, also in the report (section 5):
Malformed BasicFileInfo). That is a separate reader question.mainas it is.Testing
Unit tests are banned in this repository: none added. This PR adds an example and a markdown report only.
tools/check-local.shpasses. Not run in full: this changes no library code.cargo fmt --checkandcargo clippy --profile ci --example probe_re174_symmetric_tuples -- -D warningsare clean on upstreamf822dc6; CI runs the rest.pr85_edit/aggregate.py(kept outside the PR) turns the probe output into the figures in the report.Audit-honesty checklist
docs/rvt-moat-break-reconnaissance.mdis not included; the recent RE pull requests (research(params): RE-158, a door's and a floor's IsExternal is its type's Function (B28, B32, #35) #620, research(params): RE-159, a pipe's ConnectionType is not stored on the pipe or its type (B31, #35) #627) add the probe and thereports/element-framing/report only, as CONTRIBUTING describes, so I followed that. Say if you want the addendum as well.Legal and contribution hygiene
CLEANROOM.md). The finding comes from the bytes of the listed files. The member names (ElemRec,m_history,m_creationDateand the others) are read from each file's own embedded schema (Formats/Latest), not from Autodesk's SDK.Breaking changes
None.
Screenshots or output samples
Not applicable: no UI or IFC output changes. The probe prints one JSON line per file, described in the report's section 6; run the command above to see it.
Related issues
Refs #85.