Example of Python usage of Cuda to offset mesh
- Python You can use CUDA-driven offset for faster healing mesh with holes, example healing script can be found here
from meshlib import mrmeshpy as mlib
from meshlib import mrcudapy as mc
mesh = mlib.loadMesh("mesh.stl")
offset_params = mlib.GeneralOffsetParameters()
offset_params.signDetectionMode = mlib.SignDetectionMode.HoleWindingRule
offset_params.fwn = mc.FastWindingNumber(mesh)
offset_params.voxelSize = mlib.suggestVoxelSize(mesh, 5e6)
new_mesh = mlib.generalOffsetMesh(mp=mesh, offset=0, params=offset_params)
mlib.saveMesh(new_mesh, f"cuda_offset.ctm")