Repository navigation
Take the root of an element from its record in the project block - #190
Merged
Merged
Conversation
In a file without its own class schema, the class of an element and the stair and railing facts kept per root object were counted from every block the stream walk met for the id, which includes copies of the id in the documents of loaded families and byte runs inside other items, and misses roots the walk does not reach. When every partition stream is read by its framing, the root of each element is now its channel-102 record in the project's own block, in its current copy, and the location line of a wall is read from that record. Files with a stream whose framing does not hold, and files with their own class schema, keep the walk counts. On 23 files of the releases 2020 and 2022, 59 elements in 7 files get a class and none loses or changes one; the IFC is identical, the compact JSON names those elements. Refs #47
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
Third step of the read path onto the partition framing, after #187 and #189 (the records of the project's block on
PartitionFraming.Framed).In a file without its own class schema (Revit 2020 and 2022), the class of an element and the stair and railing facts the reader keeps per root object (
StairComponentSource:OwnedElementClassRoots,WalkedElementClassRoots, the stair membership, run input, name parameters, parameter definitions and the railing host) were counted from every block the stream walk met for the id. The walk meets the copies of an id in the documents of loaded families and byte runs inside other items, and it misses roots it does not reach; an element with two counted roots, or none, got no class. This is what issue 47 describes: removing unrelated superseded records moved the class from one element to another.Now, when every partition stream of such a file is read by its framing:
RvtFileReader.RecordFramedRoots), handed toStairComponentSource.Recordonce per element before the walk. The walk no longer counts roots.Refs #47
Measured
23 project files without their own class schema (releases 2020 and 2022), exported with the base (#189) and with this branch:
unknownare listed under their classThe 59 elements are views, schedules, sketch planes, extents, styles, a wall, a rebar, dimensions and the like. In the file of issue 47, 17 elements get their class (16 schedules and a family); through the family, 8 types of lighting fixtures get their family name and 10 viewports their IFC export parameters. Of the 34 elements the comparison printed (up to 12 per file), the walk never reached the root of 32 and counted two or three roots for 2.
The counts of the stair membership, railing host, run input and name parameter roots are the same with both ways in all 22 files compared that way. The table of parameter definitions counted once is smaller (for example 1,360 to 518): the walk also counted the parameter definitions of the family documents; the reader looks definitions up by the ids a stair names, and no output changed.
Not covered
ElemClassIdx, about thirty other per-root sources, the geometry blocks) and the block parser of issue 48 are unchanged.Verification
ValidatedTests2,ApiTests.Proxy289128_*3,ElementHeaderBoundingBoxTests3) that fail the same way on main without this change. In one earlier full run of the same codeContainerRewriterSampleTests.CompactJson_OfTheCopy_EqualsTheJsonOfTheSourcefailed as well; it passed on its own and in the two other full runs, and the cause was not found (the test writes to a temporary folder shared by every test run on the machine).TESTFILE.rvt, read with and without the removal of superseded copies, every element held once keeps its root, and an arc wall whose root the walk does not reach gets its class (this assertion fails with the walk counts).