Make LAYER2 parametric wall tools IFC-class agnostic#8229
Conversation
The wall gizmos, joins, extend/regenerate-to-underside and fillet-corner
machinery are driven entirely by placement + axis + IfcMaterialLayerSetUsage,
never the entity type. The IfcWall restriction lived only in gate predicates
and a wall-specific pset, so any AXIS2 LAYER2 element (e.g. vertical
IfcCovering siding/cladding) was excluded despite working end-to-end.
- Drop the is_a("IfcWall") gate from is_wall and is_path_connectable_wall;
gate on LAYER2 usage (plus fillet corner) instead.
- Resolve the wall/underside gizmo partner pair via the predicate, not is_a.
- Move fillet-corner state (IsFilletCorner / FilletRadius) off the wall-only
BBIM_Wall pset onto the class-agnostic EPset_Parametric, via a shared
get_parametric_prop helper that falls back to BBIM_Wall for existing files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Interesting. As a pure coding perspective I would also rename functions to be coherent with their internal changes. eg regenerate_fillet_corner_wall > regenerate_fillet_entity (or something like that), is_wall > is_layer2_entity, is_path_connectable_wall > is_path_connectable_entity - otherwise we'll have a discrepancy and risk running into bugs. Cheers I rarely ever user LAYER2's apart from walls so won't be able to crash test this. Do you mind sharing here a stripped down ifc file with a few test elements I can use ? Not sure about this, but I'm wondering if we risk a namespace collision by naming the Pset "EPset_Parametric", maybe use "EPset_BBIM_Parametric" or something like that ? Again, I am not sure about that, do we risk getting conflicting custom psets from other vendors ? Cheers |
The pen icon's gizmo group already polls the class-agnostic is_wall, so it
appears for LAYER2 coverings/siding and dispatches to bim.enable_editing_wall
— but validate_for_parametric_edit hard-rejected anything that isn't IfcWall,
cancelling the edit with a "not an IfcWall" warning.
Drop the is_a("IfcWall") gate; the actual requirement (AXIS2 layer usage + an
extrusion body) is already checked and is class-agnostic. Reword the remaining
"Wall …" blocker messages to "Element …" since they now surface for coverings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bim.enable_wall_fillet_preview and its re-edit / toggle-openings gizmos gated
on is_a("IfcWall"), so two straight LAYER2 coverings (siding/cladding) couldn't
be filleted despite meeting every real requirement.
Drop the is_a("IfcWall") checks in _resolve_two_walls and the two fillet gizmo
polls; the actual gates (has_layer2_usage + is_straight_axis, and
is_fillet_corner_wall) are already class-agnostic. The generated corner
inherits the source element's type via add_occurrence, and fillet state lives
on EPset_Parametric, so a covering corner needs no wall-specific handling.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Cool. Here's a troubleshooting file... It actually has a couple glitches worth exploring at some stage...
Feel free to push changes, with other testing conditions--you have push privileges. ...
Agreed. Do you want me to start tackling this? Or did you want to stab it? ... @Moult are you okay putting these fillet properties in EPSet_Parametric? |
|
Logging this convo, here, as well: https://community.osarch.org/discussion/comment/29548/#Comment_29548 |


The wall gizmos, joins, extend/regenerate-to-underside and fillet-corner machinery are driven entirely by placement + axis + IfcMaterialLayerSetUsage, never the entity type. The IfcWall restriction lived only in gate predicates and a wall-specific pset, so any AXIS2 LAYER2 element (e.g. vertical IfcCovering siding/cladding) was excluded despite working end-to-end.