Simple implementation of clearance clash.

This commit is contained in:
Dion Moult
2024-02-04 16:02:45 +11:00
parent 988c8f16f3
commit 1fe69e5f19
3 changed files with 419 additions and 3 deletions
@@ -197,8 +197,16 @@ class tree(ifcopenshell_wrapper.tree):
return value
args = [self, unwrap(value), allow_touching]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_collision(*args)]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_intersection(*args)]
def clash_clearance(self, value, clearance=0.05):
def unwrap(value):
if isinstance(value, entity_instance):
return value.wrapped_data
return value
args = [self, unwrap(value), clearance]
return [entity_instance(e) for e in ifcopenshell_wrapper.tree.clash_clearance(*args)]
def create_shape(settings, inst, repr=None):