Graph.find_cycles

Graph.find_cycles(breakpoints=None)[source]

Find the faces of a graph.

Parameters:
graphcompas.datastructures.Graph

The graph object.

breakpointslist, optional

The vertices at which to break the found faces.

Warning

This algorithms is essentially a wall follower (a type of maze-solving algorithm). It relies on the geometry of the graph to be repesented as a planar, straight-line embedding. It determines an ordering of the neighboring vertices around each vertex, and then follows the walls of the graph, always taking turns in the same direction.

Notes

Breakpoints are primarily used to break up the outside face in between specific vertices. For example, in structural applications involving dual diagrams, any vertices where external forces are applied (loads or reactions) should be input as breakpoints.