A python wrapper of UVAtlasTool. Tested on Linux(Ubuntu22.04) and python 3.10.14.
pip install git+https://github.com/f1shel/pyatlas.git
from pyatlas import atlas
atlas(vertices, faces,
maxCharts: int = 0,
maxStretch: float = 0.16667,
gutter: float = 2.0,
width: int = 512,
height: int = 512
)
from pyatlas import atlas
import trimesh
mesh = trimesh.load("bunny.obj")
vmapping, indices, uvs = atlas(mesh.vertices, mesh.faces)
vertices[vmapping] # new_vertices (v, 3)
indices # new_faces (f, 3)
uvs # texcoords (v, 2)