m3sh.hds.Mesh.

add_face_data#

Mesh.add_face_data(name, attr, data, default=None)#

Add face data.

Add a data block as mesh attribute and make it accessible on a per face level. The data object has to allow access to data items using index notation.

Parameters:
name, attrstr

Name of the data block and name of face attribute. The data block as a whole can be accessed as mesh.name and the value data[f] as f.attr.

datalist or dict or ndarray

Data object.

defaultobject, optional

Immutable default face attribute value.