Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ API between minor releases.
### Changed

- Reading: in a file without its own class schema (Revit 2020 and 2022) whose partition streams are read by their framing, the root object of each element, from which the reader takes the class of the element and the stair and railing facts it keeps per root, is the channel-102 record of the element in the project's own block, in its current copy. Before, the stream walk counted every block it met for the id, including copies of the id in the documents of loaded families, and missed roots it did not reach; an element with two counted roots or none had no class. On 23 such files 59 elements in 7 files now get their class (a schedule, a view, a wall, a rebar, a sketch plane and others): in the compact JSON they carry the name of their class and their usual properties instead of an empty name, and the export report names their class instead of `unknown`; the IFC of all 23 files is unchanged. Refs #47.
- Reading: in the same files the block reader, which collects the classes, geometry and other per-element facts of every element, reads the records of the project's own block as the framing lists them, in their current copy, instead of scanning the stream for anything that looks like a block. A record that runs into the next segment of its stream is read too; the blocks of the documents of loaded families, whose element ids repeat project ids, are no longer read as project elements. The geometry of a record that runs into the next segment or holds more than 1,000,000 bytes is not decoded, as the scan never reached it (the decoder takes up to minutes on such a record). Measured on 26 project files against the branch this starts from: the IFC and the compact JSON of 25 are identical; the export report of 22 differs in the elements it counts (ids that only a family document held are no longer counted) and in the category of ids that the Revit API does not return. In one architectural file 8 sketch lines change their length and 14 walls the name of their type: these elements keep two copies from different increments, which the increment table does not tell apart, and the reader now takes the other copy. Against Revit 2022, 5 of the 8 lengths are now right and 3 were right before (6465 of the 6482 sketch lines of the file are right, 6463 before), and the type name of the 14 walls is wrong both before and now. In the element list of `RvtDocument` of one test file (59,201 entries before), the 8,135 elements Revit returns keep their category, type, name, parameters and references; of the entries Revit does not return as elements, 49 without a category are gone and 50,738 change (fewer parameters on 50,564 of them, 3,737,513 parameters in all before and 3,161,540 now, and a name on 16,373). Not changed: which of two such copies is current. Refs #48.
- Reading: the element index of the files with their own class schema (the header category, design option and outline of each element, the class of its root object and the field walk of that object) and the reinforcement reader read a partition stream whose framing holds by its records: the channel-101 records of the project's own block are the element headers and its channel-102 records the root objects, one of each per element. Before, a scan of the stream took any byte run that looked like an item, including the records of the documents of loaded families, whose element ids repeat project ids; a value on which such a copy differed was dropped. On 29 files the scan found 5,987,630 header-like and 6,640,008 block-like items, the framing gives 848,325 of each. A stream whose framing does not hold is scanned as before. On 52 project files of the releases 2020 to 2027 the IFC and the export report are identical to the output of the main branch; in the compact JSON of one Revit 2021 file one element (the pen width table) now gets its name and properties, as in the other files.
- Reading: a partition stream whose framing holds (content blocks, segments, gzip members with their CRC and length, record lengths, the owners of each block) is cut into its segments by that framing; the search for gzip members and its recovery of damaged members are kept for a stream whose framing does not hold, and the diagnostics say which way a stream was read. On 52 project files of the releases 2020 to 2027 the segments are the chunks the search found, byte for byte, in all 434 partition streams; the IFC, the compact JSON and the export report of 14 of them, one or more of every release, are identical to the output of the main branch.
- Field walk by the class schema of the file: a text is read as long as its count says, where the walk stopped at a text longer than 100,000 characters; a text longer than the rest of the record stops it as any read past the end does. `rvtio coverage` also reads an extensible storage entity in the block of a loaded family by the schemas of that family's own document: up to release 2024 a family keeps them in its `ADocument` in `Global/ContentDocuments` (one document per content block, under the key of the block), from release 2025 `Global/Latest` holds them. On 52 project files of the releases 2020 to 2027 every record of every partition stream is now walked to its last byte (29,794,710 records; 117 were not: 45 at a long text, 72 at an entity of a family document); no class row has fewer exact records. Output: of ten files that hold such a text, eight family types of lighting fixtures in two MEP files get their parameter list in the compact JSON, and in three files of one MEP project one view type and one sun study change the reason they are left out of the IFC for; the IFC of the ten files does not change.
Expand Down
2 changes: 1 addition & 1 deletion docs/test-fixtures.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ folder (`TestFiles.Scratch`); no test uses a fixed absolute path.

## What runs without the private files

With no private file at all, 9686 of the 10105 test cases run and pass and 419 are skipped: 413 need private files (listed
With no private file at all, 9688 of the 10107 test cases run and pass and 419 are skipped: 413 need private files (listed
below; 17 of them only `bim_dump.txt` or `formats_latest_decompressed.bin`) and 6 need other inputs (two need symbolic links, three
need `RVTIO_FREEFORM_FULL`, `RVTIO_CYL_FULL` or `RVTIO_MESH_FULL`, one is a known gap). The tests that run use synthetic data built
in the tests and the small fixtures committed under `tests/RvtIO.Tests/Fixtures`. With the full private fixture folder the
Expand Down
7 changes: 7 additions & 0 deletions src/RvtIO/Internal/ParsingState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ public Ifc.IfcNumericUnitPlan? OwnDocumentIfcNumericUnitPlan
/// its segments and the records of the project's own block, without the copies record routing marks as not current.</summary>
public IReadOnlyList<Parsing.PartitionFraming.Framed?>? FramedPartitions { get; set; }

/// <summary>How many of the first <see cref="Chunks"/> are the chunks of the partition streams (the chunks of Formats and Global follow).</summary>
public int PartitionChunkCount { get; set; }

/// <summary>True for a file without its own class schema whose every partition stream is read by its framing: the readers take the
/// records of the project's own block (<see cref="FramedPartitions"/>) instead of scanning the partition chunks.</summary>
internal bool ReadsFramedRecords => WideSchema == null && FramedPartitions is { Count: > 0 } framed && framed.All(f => f is { IdWidth: 4 });

/// <summary>The own name of an element of a <see cref="WideSchema"/> file, read from its root block by the schema-driven walk.</summary>
public Dictionary<uint, string> WideNames { get; } = new();

Expand Down
Loading
Loading