MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / rebuild

Function rebuild

python_scripts/mesh_rebuild.py:4–10  ·  view source on GitHub ↗
( mesh : mm.Mesh, voxelSize : float, decimate : bool = True )

Source from the content-addressed store, hash-verified

2from meshlib import mrcudapy as mc
3
4def rebuild( mesh : mm.Mesh, voxelSize : float, decimate : bool = True )->mm.Mesh:
5 params = mm.RebuildMeshSettings()
6 params.voxelSize = voxelSize # mm.suggestVoxelSize(mesh,5e7) # suggest amount of voxels to use
7 if mc.isCudaAvailable():
8 params.fwn = mc.FastWindingNumber(mesh) # only if cuda is available, for speedup
9 params.decimate = decimate
10 return mm.rebuildMesh(mesh,params) # it can leave some small components

Callers

nothing calls this directly

Calls 2

isCudaAvailableMethod · 0.80
FastWindingNumberMethod · 0.45

Tested by

no test coverage detected