pmneila/PyMCubes

number of mesh points

Opened this issue · 2 comments

Can I specify the number of mesh points? For example,
vertices, triangles = mcubes.marching_cubes(cube, 0.5)
and I hope to get a mesh with 6000 points.

Hi, @faneggs,

No, you can't. The number of points depends on the contents of the input volume, and it's only known after running the marching cube algorithm. There might be two possible solutions for you: you can either resample the input volume in different sizes until you find a suitable one for your needs (a smaller input array will lead to a smaller number of vertices), or you can remesh/tessellate/decimate the resulting mesh as a post-processing step in an mesh editing software (e.g., Blender).

Hope that helps!

Hi, @faneggs,

No, you can't. The number of points depends on the contents of the input volume, and it's only known after running the marching cube algorithm. There might be two possible solutions for you: you can either resample the input volume in different sizes until you find a suitable one for your needs (a smaller input array will lead to a smaller number of vertices), or you can remesh/tessellate/decimate the resulting mesh as a post-processing step in an mesh editing software (e.g., Blender).

Hope that helps!

OK, thx!