mesh_planarize_faces

compas.datastructures.mesh_planarize_faces(mesh, fixed=None, kmax=100, callback=None, callback_args=None)[source]

Planarise a set of connected faces.

Planarisation is implemented as a two-step iterative procedure. At every iteration, faces are first individually projected to their best-fit plane, and then the vertices are projected to the centroid of the disconnected corners of the faces.

Parameters
  • mesh (compas.datastructures.Mesh) – A mesh object.

  • fixed (list[int], optional) – A list of fixed vertices.

  • kmax (int, optional) – The number of iterations.

  • d (float, optional) – A damping factor.

  • callback (callable, optional) – A user-defined callback that is called after every iteration.

  • callback_args (list[Any], optional) – A list of arguments to be passed to the callback function.

Returns

None