network_find_cycles

compas.datastructures.network_find_cycles(network, breakpoints=None)[source]

Find the faces of a network.

Parameters:
networkcompas.datastructures.Network

The network 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 network 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 network, 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.