CellNetwork.add_face

CellNetwork.add_face(vertices, fkey=None, attr_dict=None, **kwattr)[source]

Add a face to the cell network.

Parameters:
verticeslist[int]

A list of ordered vertex keys representing the face. For every vertex that does not yet exist, a new vertex is created.

fkeyint, optional

The face identifier.

attr_dictdict[str, Any], optional

dictionary of halfface attributes.

**kwattrdict[str, Any], optional

A dictionary of additional attributes compiled of remaining named arguments.

Returns:
int

The key of the face.

Notes

If no key is provided for the face, one is generated automatically. An automatically generated key is an integer that increments the highest integer value of any key used so far by 1.

If a key with an integer value is provided that is higher than the current highest integer key value, then the highest integer value is updated accordingly.

All edges of the faces are automatically added if they don’t exsit yet. The vertices of the face should form a continuous closed loop. However, the cycle direction doesn’t matter.