Skip to content

Recover the column profile from the family-local symbol record instead of the bbox envelope #215

Closed

Description

@DrunkOnJava

Follow-up to #204 / PR #210.

The 256 recovered columns are emitted with an IfcExtrudedAreaSolid over an IfcRectangleProfileDef taken from the record's own bounding box. RvtColumnGeometry.ProfileResolved is false and the property set names partition_element_record_bbox as the body source, because the box is an envelope: it happens to be exact for a 24" x 24" square column and would be wrong for a round, I-shape or sketched column.

The file already carries the right thing. The records this PR drops as "family-local" are the type/symbol envelopes, and they are the profile in family coordinates: symbol 5755 (Column_Sqaure : 24" x 24") has bbox (-1.0, -1.0, -0.0) → (1.0, 1.0, 9.0) — a 2 ft square about the origin. Sixteen more family-local OST_Columns records exist on this file, one per level band, differing only in extent.

Proposal:

  1. Keep the family-local records instead of discarding them, as a symbol table keyed by ElementId.
  2. Join each instance to its symbol. Instance record bodies carry the symbol's ElementId as a u64 in a sorted id set — all 391 non-symbol OST_Columns records on this file reference 5755.
  3. Emit the profile from the symbol envelope and the height from the instance envelope, and flip ProfileResolved to true only when the join succeeds.

src/ifc/from_decoded.rs already has column_circular_extrusion, column_i_shape_extrusion, column_rectangular_hollow_extrusion and column_arbitrary_profile_extrusion waiting for a real profile shape; a bbox alone cannot choose between them, so this needs the symbol's actual geometry, not just its extent. Step 3 is therefore a rectangle-only improvement until the symbol body is decoded — still strictly better than the instance envelope, and it makes the honesty flag meaningful.

Related: #204.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions