First attempt at implementation of intersection clash checks.

This considers only protruding clashes. It does not consider touching nor encroaching clashes and does not consider protrusion direction in the protrusion distance.
This commit is contained in:
Dion Moult
2024-02-01 18:30:20 +11:00
parent 7a7fde0a2a
commit e95e16c102
4 changed files with 587 additions and 1 deletions
@@ -181,6 +181,15 @@ class tree(ifcopenshell_wrapper.tree):
args.append(kwargs.get("extend", -1.0e-5))
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.select_box(*args)]
def clash_intersection(self, value, tolerance=0.002):
def unwrap(value):
if isinstance(value, entity_instance):
return value.wrapped_data
return value
args = [self, unwrap(value), tolerance]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_intersection(*args)]
def create_shape(settings, inst, repr=None):
"""