Refactor Marching Cubes surface extractor

Create issue
Issue #64 resolved
David Williams created an issue

The Marching Cubes surface extractor is a little messy at the moment. Although the interface is a single function (which is nice), internally it simply wraps the old implementation by creating an instance of the MarchingCubesSurfaceExtractor class and calling the execute() function. It would (probably) be better to refactor the code into a set of standalone functions, which would then make it easier to review the logic of the algorithm and profile/improve the performance.

Comments (2)

  1. David Williams reporter

    I've finally made some good progress here. The refactoring into a single function has been (mostly?) completed and has also enabled some performance improvements. Processing empty cells is now roughly twice as fast and processing occupied cells is roughly 20% faster (and in a typical volume empty cells are much more common that occupied cells. Also, it seems there was a bug in detecting duplicate vertices as the new implementation generates less vertices than before.

  2. Log in to comment