quadmesh_planarize
- quadmesh_planarize(M, kmax=500, maxdev=0.005)[source]
Planarize the faces of a quad mesh.
Iteratively modify vertex positions to make all quad faces as planar as possible while minimizing the deviation from the original shape.
- Parameters:
- Mtuple[list[list[float]], list[list[int]]]
A quad mesh represented by a tuple of (vertices, faces) where vertices are 3D points and faces are quads
- kmaxint, optional
The maximum number of iterations. Default is
500
.- maxdevfloat, optional
The maximum allowed deviation from planarity. Default is
0.005
.
- Returns:
- list[list[float]]
The coordinates of the new vertices after planarization.
- Raises:
- ValueError
If the input mesh contains faces other than quads or triangles.
Notes
The input mesh should consist of quad and triangle faces, else ValueError is raised.