The early break may miss some points in voxel_num < max_voxels. Use continue instead of break will be OK.
Attach a file by drag & drop or click to upload