constrained_smoothing

compas_tno.algorithms.constrained_smoothing(mesh, kmax=100, damping=0.5, constraints={}, algorithm='centroid')[source]

Constrained smoothing of a mesh. Constraints can be points and lines.

Parameters
  • mesh (Mesh) – A mesh to smooth.

  • kmax (int) – Number of iterations for smoothing. Default value 100.

  • damping (float) – Damping value for smoothing between 0 and 1. Default value 0.5.

  • constraints (dict) – Dictionary of constraints as vertex keys pointing to fixed points or lines.

  • algorithm (string) – Type of smoothing algorithm to apply (classic centroid or area-based). Classic centroid by default.

Returns

mesh (Mesh) – The smoothed mesh.

Notes

This function was extracted from compas singular developed by Robin Oval.