CuMesh is a GPU-accelerated library designed for high-performance 3D geometry processing directly within the PyTorch ecosystem. It provides efficient primitives for mesh cleaning, decimation, remeshing, and UV unwrapping.
Key features include:
xatlas enhenced by a fast mesh clustering on the GPU.git clone https://github.com/JeffreyXiang/CuMesh.git --recursive
pip install CuMesh --no-build-isolation
See the examples directory for more detailed usage.
cumesh.CuMeshinit(vertices, faces): Initialize mesh with [V,3] and [F,3] CUDA tensors.read(): Return current (vertices, faces) tensors.simplify(target_num_faces, verbose=False, options={}): Fast GPU-accelerated mesh decimation.uv_unwrap(verbose=False, ...): Generate UVs using accelerated clustering and Xatlas.fill_holes(max_hole_perimeter): Triangulate and close boundary loops.repair_non_manifold_edges(): Split edges to resolve non-manifold geometry.remove_degenerate_faces(): Remove zero-area faces or those with NaN normals.remove_duplicate_faces(): Remove faces with identical vertex indices.remove_small_connected_components(min_area): Delete isolated components below area threshold.unify_face_orientations(): Reorient faces to have consistent winding order.compute_face_normals(), compute_vertex_normals(): Trigger normal calculation (access via read_*_normals).get_connected_components(): Compute connectivity (access via read_connected_components).get_boundary_loops(): Detect boundaries (access via read_boundary_loops).num_vertices, num_faces, num_edges, num_boundaries.cumesh.remeshingremesh_narrow_band_dc(...): Performs Dual Contouring reconstruction based on the UDF of the input mesh.cumesh.cuBVHNOTE: This is a wrapper around the cubvh library.
cumesh.AtlasNOTE: This is a wrapper around the xatlas library.
add_mesh(vertices, faces, normals=None, uvs=None): Register mesh geometry (Must be CPU tensors).compute_charts(max_chart_area, ...): Segment mesh into UV charts (parameterization).pack_charts(resolution, padding, ...): Pack generated charts into a texture atlas.get_mesh(index): Retrieve processed data as (vertex_map, faces, uvs).
vertex_map: Maps new vertex indices to original input indices.This package builds upon and integrates code from several excellent open-source libraries. We would like to express our gratitude to the authors of:
1,950 followers · starred Dec 2025
467 followers · starred Dec 2025
CuMesh is a GPU-accelerated library designed for high-performance 3D geometry processing directly within the PyTorch ecosystem. It provides efficient primitives for mesh cleaning, decimation, remeshing, and UV unwrapping.
Key features include:
xatlas enhenced by a fast mesh clustering on the GPU.git clone https://github.com/JeffreyXiang/CuMesh.git --recursive
pip install CuMesh --no-build-isolation
See the examples directory for more detailed usage.
cumesh.CuMeshinit(vertices, faces): Initialize mesh with [V,3] and [F,3] CUDA tensors.read(): Return current (vertices, faces) tensors.simplify(target_num_faces, verbose=False, options={}): Fast GPU-accelerated mesh decimation.uv_unwrap(verbose=False, ...): Generate UVs using accelerated clustering and Xatlas.fill_holes(max_hole_perimeter): Triangulate and close boundary loops.repair_non_manifold_edges(): Split edges to resolve non-manifold geometry.remove_degenerate_faces(): Remove zero-area faces or those with NaN normals.remove_duplicate_faces(): Remove faces with identical vertex indices.remove_small_connected_components(min_area): Delete isolated components below area threshold.unify_face_orientations(): Reorient faces to have consistent winding order.compute_face_normals(), compute_vertex_normals(): Trigger normal calculation (access via read_*_normals).get_connected_components(): Compute connectivity (access via read_connected_components).get_boundary_loops(): Detect boundaries (access via read_boundary_loops).num_vertices, num_faces, num_edges, num_boundaries.cumesh.remeshingremesh_narrow_band_dc(...): Performs Dual Contouring reconstruction based on the UDF of the input mesh.cumesh.cuBVHNOTE: This is a wrapper around the cubvh library.
cumesh.AtlasNOTE: This is a wrapper around the xatlas library.
add_mesh(vertices, faces, normals=None, uvs=None): Register mesh geometry (Must be CPU tensors).compute_charts(max_chart_area, ...): Segment mesh into UV charts (parameterization).pack_charts(resolution, padding, ...): Pack generated charts into a texture atlas.get_mesh(index): Retrieve processed data as (vertex_map, faces, uvs).
vertex_map: Maps new vertex indices to original input indices.This package builds upon and integrates code from several excellent open-source libraries. We would like to express our gratitude to the authors of:
1,950 followers · starred Dec 2025
467 followers · starred Dec 2025