MeshTransformer#

class polpo.preprocessing.mesh.transform.MeshTransformer(func, attr=None)[source]#

Bases: PreprocessingStep

Applies function to mesh attribute.

NB: operations are done in place.

Parameters:
  • func (callable) – Function to apply to attribute.

  • attr (str) – Mesh attribute containing vertex information. If None, it uses registered or “vertices”.

apply(mesh)[source]#

Apply step.

Parameters:

mesh (Mesh) – Mesh to transform.

Returns:

transformed_mesh (Mesh) – Transformed mesh.