InteractionMixin

class compas_ifc.interactions.InteractionMixin

Bases: object

Mixin that adds interaction-graph capabilities to a Model subclass.

Expects the host class to provide: - self._fileIFCFile - self._elements — dict of guid → GenericElement - self._elements_by_global_id — dict of IFC GlobalId → GenericElement - self.graphcompas_model.models.InteractionGraph - self.add_interaction(a, b) — from compas_model.Model - self.elements() — iterator over all GenericElement

Methods

compute_collisions

Detect volumetric collisions (interferences) between building elements.

compute_connections

Detect geometric contacts between building elements and add them as connection edges.

get_interactions_by_category

Get all graph edges that have at least one relationship of a given category.

get_interactions_by_group

Get all graph edges belonging to a relationship group.

show_collision_pairs

Visualize all collision pairs at once, each pair in its own colour.

show_collisions

Show the model with an interactive collision list in compas_viewer.

trace_connections

Trace elements reachable from start through interaction edges.

Inherited Methods

__init__