python – Is there a way to fill the gaps in a voxel representation of an STL file of a hollow tube?

I am using Open3D to transform a stl file from a mesh to its voxel representation to run a simulation. However, when I do the transformation there seems to be gaps between the voxels and I want it to be a closed surface.

I was thinking of maybe interpolation but I’m not sure how to go about it. Here is a picture of how the Voxelized rendering looks like:

enter image description here

I need the spaces between the voxels gone without compromising the shape of the object so changing the voxel size may not be ideal.

Read more here: Source link