InteractionMixin.compute_collisions
- InteractionMixin.compute_collisions(tolerance=1e-06, min_depth=0.0001, element_types=None, create_ifc_relations=True, skip_related=True)
Detect volumetric collisions (interferences) between building elements.
Uses the same two-stage broadphase as
compute_connections():BVH spatial search with inflated AABBs to find rough neighbours.
Tight world-space AABB overlap test to discard false positives.
Then performs ray-casting collision detection on remaining pairs. Discovered collisions are stored as
"interference"relationship records on the interaction graph.- Parameters:
- tolerancefloat, optional
Numerical tolerance for the ray-triangle intersection test. Default
1e-6.- min_depthfloat, optional
Minimum penetration depth to count as a collision (excludes touching pairs). Default
1e-4.- element_typeslist[str], optional
IFC type names to include (e.g.
["IfcWall", "IfcColumn"]). Subclass matching applies, so"IfcWall"includesIfcWallStandardCase. IfNone, all non-spatial elements with geometry are considered.- create_ifc_relationsbool, optional
If
True(default), also createIfcRelInterferesElementsentities in the IFC file so that discovered interferences persist on save/reload.- skip_relatedbool, optional
If
True(default), skip pairs where one element is an ancestor of the other in the spatial tree. This filters out expected overlaps such aswall → opening → window/door(the void/fill chain), where the opening and its filler share the same volume by construction.
- Returns:
- int
Number of new interference edges created.