PyMCubes icon indicating copy to clipboard operation
PyMCubes copied to clipboard

Using Voxel Centers for Marching Cubes

Open davidstutz opened this issue 8 years ago • 3 comments

Unfortunately, I cannot create a pull request for a new branch.

This pull request includes the changes of #11 and additionally changes the marching cubes algorithm to use the voxel centers as reference points. This shifts the resulting mesh slightly.

@pmneila: I suggest not merging this pull request into master; you can create a new branch if you like, otherwise this pull request is just for people interested in the changes and you can leave it open.

Thanks.

davidstutz avatar Nov 23 '17 15:11 davidstutz

This is an interesting PR. I would like to adapt the API to allow the user which kind of reference points they want (the original style or the voxel centers). I have to think about it.

By the way, your commit https://github.com/pmneila/PyMCubes/pull/12/commits/34ce2be82c1575eeb026008bf170ef686e054190 is adding _mcubes.cpp to the repository. This is an automatically generated file and it should not be tracked by git unless you have a very good reason for that. Is there a reason for that? Otherwise, could you remove it?

pmneila avatar Nov 23 '17 17:11 pmneila

No adding _mcubes.cpp was an error (I probably automatically added all .cpp files). Sorry for that. I will make a new PR in the near future.

Regarding the API, I think it would be very nice to let the user switch. For my research, I actually used at least two different variants (voxel centers and voxel corners). But I simply duplicated the marching cubes functions - quick and dirty before the deadline.

davidstutz avatar Dec 13 '17 13:12 davidstutz

@pmneila: Removed _cubes.cpp.

davidstutz avatar Dec 15 '17 12:12 davidstutz