HalfFace.add_cell

HalfFace.add_cell(faces, ckey=None, attr_dict=None, **kwattr)[source]

Add a cell to the volmesh object.

Parameters
  • faces (list of list of int) – The faces of the cell defined as lists of vertices.

  • ckey (int, optional) – The cell identifier.

  • attr_dict (dict, optional) – cell attributes.

  • kwattr (dict, optional) – Additional named cell attributes. Named cell attributes overwrite corresponding attributes in the attribute dict (attr_dict).

Returns

int – The key of the cell.

Raises

TypeError – If the provided cell key is of an unhashable type.

Notes

If no key is provided for the cell, 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.

Examples

>>>