Lets an occurrence's extrusion length be either driven by the type
(typed/shared, e.g. Revit-mapped mullions) or owned by the occurrence
(per-instance, editable), and lets the user switch between the two.
- bim.make_profile_length_per_instance: un-maps a shared mapped body into a
per-instance SweptSolid (shared IfcProfileDef kept; the old mapped body is
orphaned, not deleted, to avoid cascading to sibling instances), gives the
occurrence its own IfcMaterialProfileSetUsage (so the Length UI appears), and
normalizes the placement so the extrusion runs local Z 0->depth -- Revit puts
the object and extrusion origins on opposite ends, which made extend_profile
flip the origin.
- bim.make_profile_length_type_driven: the inverse -- re-maps the occurrence
onto the type's shared representation, promoting the occurrence's body onto
the type first if the type has no RepresentationMap.
- A "Per-instance Length" checkbox in the Type panel (a get/set property that
reads the current mode straight from the IFC, so there is no stored state to
desync).
- New occurrences of a mapped/typed profile type default to per-instance.
- recreate_profile now skips mapped bodies (reloading the mesh instead of
regenerating), so assigning a length-driven type keeps the occurrence typed
rather than un-mapping it mid-assign and emptying sibling instances via the
shared-representation removal cascade.
- assign_type preserves a per-instance occurrence's own geometry/length
(should_map_representations=False) instead of converting it to typed.
Design/working notes under docs/dev-notes/profile-length-per-instance.md.
Closes#8657Closes#8656
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>