mesh_subdivide_catmull_clark

compas_cgal.subdivision.mesh_subdivide_catmull_clark(mesh, k=1)

Subdivide a mesh with the Catmull Clark scheme.

Parameters:
meshcompas_cgal.types.VerticesFaces

The mesh to remesh.

kint, optional

The number of subdivision steps.

Returns:
compas_cgal.types.VerticesFacesNumpy

Examples

>>> from compas.geometry import Box, Polyhedron
>>> from compas_cgal.subdivision import mesh_subdivide_catmull_clark
>>> box = Box(1)
>>> mesh = box.to_vertices_and_faces()
>>> result = mesh_subdivide_catmull_clark(mesh, k=3)
>>> shape = Polyhedron(*result)