how to make sure the result of vtkMarchCube or vtkFlyingEdge3D is closed one, which has no boundary edges and non-manifold edges

Hi Gays:
operations below, how could i make sure the result of these operations is a closed mesh, which has no boundary edges and non-manifold edges.
OPERATIONS:
step 1: create a closed surface A, which has no boundary edges and non-manifold edges.
step 2: use vtkImplicitPolyDataDistance, and vtkSampleFunction to sample a vtkImageData for surface A
step 3: modify the vtkImageData sampled(difference, intersection, union with another surfaces or planes, and so on)
step 4: extract the isosurface from vtkImageData modified with vtkMarchCube or vtkFlyingEdge3D.
REQUIREMENT: isosurface has no boundary and non-manifold egdes, vtkSelectEnclosedPoints::IsSurfaceClosed(isosurface) == true.
Is there anyone can help me?

Here’s one approach: Create the isosurface. Then execute vtkFeatureEdges (using the isosurface as input) with BoundaryEdgesOn, and NonManifoldEdgesOn; all other edge types off. If the output of vtkFeatureEdges is empty, then you are good to go.

Thanks! I know the method to check whether the isosurface is good one, i want to know how to make the bad one being closed. Is there any general methods can use?

In general, I don’t know of a foolproof way to repair a non-closed surface. You can try things like building closed loops and triangulating them. But in general, these loops may not be planar, so the triangulation will likely fail. Another approach I’ve seen used somewhat successfully is to “shrink wrap” objects (see this old reference for GDMs). However these are numerically sensitive and slow. There are probably other approaches that I’m forgetting - this is a difficult problem.

Thanks for your replying !