Skip to content

Make LAYER2 parametric wall tools IFC-class agnostic#8229

Open
theoryshaw wants to merge 3 commits into
v0.8.0from
layer2-agnostic-parametric-tools
Open

Make LAYER2 parametric wall tools IFC-class agnostic#8229
theoryshaw wants to merge 3 commits into
v0.8.0from
layer2-agnostic-parametric-tools

Conversation

@theoryshaw

Copy link
Copy Markdown
Member

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.

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>
@theoryshaw theoryshaw marked this pull request as draft July 1, 2026 14:52
@theoryshaw theoryshaw requested a review from Gorgious56 July 1, 2026 14:58
@Gorgious56

Copy link
Copy Markdown
Contributor

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

theoryshaw and others added 2 commits July 2, 2026 07:08
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>
@theoryshaw

Copy link
Copy Markdown
Member Author

Cool.

Here's a troubleshooting file...
https://hub.openingdesign.com/OSArch/Community_Troubleshooting/src/branch/main/_Agnostic_LAYER2_tools/Agnostic_LAYER2_tools.ifc

It actually has a couple glitches worth exploring at some stage...

image

Feel free to push changes, with other testing conditions--you have push privileges.

...

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

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?
image

@theoryshaw theoryshaw marked this pull request as ready for review July 2, 2026 14:23
@theoryshaw

Copy link
Copy Markdown
Member Author

Logging this convo, here, as well: https://community.osarch.org/discussion/comment/29548/#Comment_29548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants