Repository navigation
Conversation
…read from its records, and family files are no longer refused by the native reader (DrunkOnJava#1189) (RE-508) A family's types are not its FamilySymbol records, which are its nested families' types, but the FamilyTypeTable of its own Family record (the one no FamilySurrogate names, with an empty m_name): one {name, params} entry per type, the slots in PartAtom's order, and a blank entry copying the saved type, or, in a family with no named type, being its one type. native_family_types reads it, names each value by the family's definitions with its SI value, and rvt-info lists the types as family_type_records (elements::parameters::family_types_lossy). On Autodesk's sample family of every release 2016 to 2027 and, local only, 11 more families and templates of 2015, 2020 and 2025, all 59 types PartAtom lists are read and all 279 values compared equal it (tools/re/family_types_vs_partatom.py, tests/family_types.rs). Built-in slots are not read. The native preamble refused every Autodesk family with "invalid increment episode range": its increment table opens with the template's increments, which count no episode and forward to the first stored one. They are accepted where they forward alike, and a route is bounded by the table's length rather than 128 (a 2015 template chains 236). A family's elements now get their saved parameters; no IFC changes on the 28 family and template files read.
A project's every record is more than a small machine holds; with a filter, the census now selects only the classes it matches.
|
@puzzbobb, thank you. As you describe it, this reads a family's own types from its CI is running, and |
|
@puzzbobb, what the measurements show so far, before the code read, on a merge of
Nothing stands in the way from these, beyond the merge of |
|
@puzzbobb, the code read, and one correction to my earlier comment: on 2016 to 2019 PartAtom lists 15 values per file, and all 15 are equal; 15 of 18, with Default Elevation not read, is 2020 to 2027. Nothing to change in the code:
Two asks, both docs only:
Next, yours: the merge of |
Summary
Part of #1189 (W3: types and parameters; geometry not touched). RE-508.
FamilySymbolrecords, which are its nested families' types. They are theFamilyTypeTableof the family's ownFamilyrecord (the one noFamilySurrogatenames, with an emptym_name). Itsm_pairshold one{name, params}per type, with the slots in PartAtom's order, plus a blank entry that copies the saved type; in a family with no named type, that blank entry is its one type, which PartAtom names after the family.research::native_family_typesreads the table and names each value by the family's definitions, with SI lengths, and material and nested-type names.elements::parameters::family_types_lossygives the types as JSON, andrvt-infolists them asfamily_type_recordsbeside the PartAtom table (summary.schema.jsonupdated).invalid increment episode range. The table opens with the template's increments, which count no episode and forward to the first stored increment, and one of them has a greatest episode below its predecessor's. Such rows are accepted only where they forward alike, so routing is unchanged. A route is now bounded by the table's length instead of 128 (a 2015 template chains 236 redirects).Measured
tools/re/family_types_vs_partatom.pychecks the record types against each family's PartAtom table, on 23 family files of 2015 to 2027. These are the phi-ag samples for 2016 to 2026 and, local only, Autodesk's 2027 sample, a 2015 family template, four 2020 families and six 2025 families.tests/family_types.rs(corpus=samples) holds every release 2016 to 2027 to this.rvt-ifcoutput is identical tomain's, apart from the timestamp, on all 28 family and template files read.rvt-elementsnow gives the sample families' elements their saved parameters, where each saidsaved-parameters-unreadbefore.Not done: built-in slots, Revit's export of a family placed in a project (which W3 asks for), and geometry. W3 stays failed.
Clean-room
The changes in this PR are based on public byte observations of the files above and on the
PartAtomtext Revit writes into each family (CLEANROOM.md source 1). I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code beyond public symbol exports, and I have not copied or translated code from revit-ifc.Checks
These pass locally:
cargo fmt --check-D warningson the lib and bins (all features), the integration tests and the new probes-D warningscargo +1.87 checkchangelog.py check,api-doc-ids.py,readme-matrix.py --checkandmeasured_numbers.py