Network.is_planar

Network.is_planar()[source]

Check if the network is planar.

Parameters

network (compas.datastructures.Network) – A network object.

Returns

bool – True if the network is planar. False otherwise.

Raises

ImportError – If the planarity package is not installed.

Notes

A network is planar if it can be drawn in the plane without crossing edges. If a network is planar, it can be shown that an embedding of the network in the plane exists, and, furthermore, that straight-line embedding in the plane exists.

Warning

This function uses the python binding of the edge addition planarity suite. It is available on Anaconda: https://anaconda.org/conda-forge/python-planarity.