pmneila Maching cube, configure input

166 views Asked by At

I am working in python and try to use pmneila Maching cube (https://github.com/pmneila/PyMCubes).

In my system, I got a list of coordinates for each of my cubes. A simple example :

myCubes = []
myCubes.append( vec3(x,y,z) )  # for each of my cubes

I can't figure out how to convert this to the marching cube input's.

I want something like:

u = doStuffToConvertMyCubesListe(myCubes)
mcubes.marching_cubes(u, 0)

In the provided example it build a sphere with numpy.mgrid, but I can't figure out how. I tried to build a big cube from little cubes through the marching cube algorithm.

Can you explain how to do that ? Thanks

1

There are 1 answers

0
Orion On BEST ANSWER

I figure it out

So, each coordinate [X][Y][Z] is the voxel coordinate.

Positive Value mean this voxel is inside the geometrie (where I previously spawn a cube) and negative value mean it is outise the geometry (where there is nothing)