Here is a rough explanation of what I'm doing on vtk :
- Create a surface (a minimal surface not too matching with what it is, geometry is important, though: the gyroid has two labyrinths that are completely disconnected from each other).
- use
vtkClipClosedSurface to turn off one of the mazes so that I get an object that no longer has open surfaces. A regular surface looks like this , with a closed surface it looks like that .
Here is my problem: for more complex versions of my structure, I get the following:
Can you see how in the upper left corner everything works fine, and at the bottom below it stops creating surfaces? Sometimes I also get really strange triangles in this last part.
As far as I understand, vtkClipClosedSurface knows from surface normals where it is possible to close the surface and where not. The fact is that the normals of my structure are beautiful, and they all point in the right direction. If you look more closely at the structure, you will notice that the lower part is basically an inversion of the upper part, which gradually changes, all on one surface.
I tried changing my structure before cutting many things, such as vtkSmoothPolyDataFilter , vtkCleanPolyData or vtkPolyDataNormals . I even tried to extract the boundary surfaces with vtkFeatureEdges , which led to an even worse result. Even vtkFillHolesFilter did not give acceptable results. My surface seems flawless and light enough to create a border.
I have no idea what else to try. This happens for other structures. Fixing this with the CAD tool is out of the question because it should work out of the box. Please help me!
Here is another example of geometry that does not cover the surface properly. This time I used vtkFillHolesFilter , which leads to surfaces inside the structure, and they should occupy only the border of the te object. 
If you need a more detailed exposition of my pipeline, here's what:
- create surface using
mayavi.mlab.contour3d - get
PolyData by retrieving actor.mapper.input - convert format from
tvtk to regular vtk vtkClipClosedSurface with a flat collection that cuts off part of the structure (errors occur when the assembly of the plane coincides with the boundary of the structure)- visualize it
Edit: ok, that didn't get enough attention, so I built a minimal, complete, and verifiable working example that reproduces the behavior:
import numpy as np import vtk
This is really short, as I understand it, I lost as much as I could. The problem still persists and I cannot find a solution.