Implement collision clash type (pure tri intersection regardless of protrusion)

This should be equivalent to select(element) but faster and with an allow_touching toggle.
This commit is contained in:
Dion Moult
2024-02-04 09:01:35 +11:00
parent 080b628df5
commit 988c8f16f3
3 changed files with 2035 additions and 11 deletions
@@ -190,6 +190,16 @@ class tree(ifcopenshell_wrapper.tree):
args = [self, unwrap(value), tolerance]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_intersection(*args)]
def clash_collision(self, value, allow_touching=False):
def unwrap(value):
if isinstance(value, entity_instance):
return value.wrapped_data
return value
args = [self, unwrap(value), allow_touching]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_collision(*args)]
def create_shape(settings, inst, repr=None):
"""