Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voxelization of only the surface of an STL mesh #466

Open
venugovh opened this issue Jul 15, 2021 · 2 comments
Open

Voxelization of only the surface of an STL mesh #466

venugovh opened this issue Jul 15, 2021 · 2 comments

Comments

@venugovh
Copy link

Hi,

I am trying to voxelize a very small feature stl mesh. The stl mesh is rather large in size. So to capture the small features, I ended up using a small value of the density parameter. The two images below show that when I voxelize the mesh I lose the feature circled in red. When I reduce the voxel size further, I run into memory error due to large NumPy arrays and also it takes a lot of time. One option is for me to only voxelize the surface of the mesh.

Issue #386 seems to talk about surface only voxelization. But this approach involves first creating the bulk voxels and then extracting the surface voxels from the bulk.

Is there a way to directly voxelize only the surface of a mesh? I am currently using the pyvista.voxelize(mesh, density) function.

test_mesh
test_voxels

Thanks!

@adamgranthendry
Copy link

@Vysakh5391 My first suggestion would be to see if you can further subdivide your mesh for the smallest mandrel you have circled. Not knowing more about the voxelization algorithm, I wonder if it is impacted by the size and shape of your meshed input data?

@venugovh
Copy link
Author

@adamgranthendry Thank you for your response. Since the subdividing the mesh/voxel to capture the smallest feature size is a memory heavy method, I am looking for a way to voxelize only the surface of the mesh and not the bulk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants