Skip to content
Advertisement

How to plot output from marching_cubes_lewiner in python?

I’ve been able to use the lewiner marching cubes algorithm in python. It outputs vertices, faces, and other attributes. I want to be sure that it is working correctly, so I’d like to plot a 3D image of what the function returns. However, I have not had any success so far. I have tried the following:

Successful retrieval of necessary fields:

JavaScript

And unsuccessful plots of the retrieved values:

JavaScript

And also:

JavaScript

Hypothetically, I would like to use the verts, faces, etc in a machine-learning algorithm, but I’d like to be sure that the returned values are reliable. Any one have experience with anything like this?

Advertisement

Answer

I don’t know if you’re still looking for an answer to this, but I just experienced a problem for plotting the mesh through this function as well. I was getting no error but an empty plot. Should this be the case for you as well, I solved it by specifying the axis limits. The following did the trick for me:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement