Convert attribute ``attr`` from either per-vertex or per-voxel attribute into per-face attribute. Args: mesh (:py:class:`Mesh`): Input mesh. attr (``numpy.ndarray``): #faces by k matrix of floats. Returns: Per-face attribute. The value at a face will be the ave
(mesh, attr)
| 22 | return PyMesh.convert_to_vertex_attribute_from_name(mesh.raw_mesh, name) |
| 23 | |
| 24 | def convert_to_face_attribute(mesh, attr): |
| 25 | """ Convert attribute ``attr`` from either per-vertex or per-voxel attribute |
| 26 | into per-face attribute. |
| 27 | |
| 28 | Args: |
| 29 | mesh (:py:class:`Mesh`): Input mesh. |
| 30 | attr (``numpy.ndarray``): #faces by k matrix of floats. |
| 31 | |
| 32 | Returns: |
| 33 | Per-face attribute. The value at a face will be the average of |
| 34 | the values at its neighboring vertices or its neighboring voxels. |
| 35 | """ |
| 36 | return PyMesh.convert_to_face_attribute(mesh.raw_mesh, attr) |
| 37 | |
| 38 | def convert_to_face_attribute_from_name(mesh, name): |
| 39 | """ Same as :py:func:`convert_to_face_attribute` except looking up |