Construct a simple mesh or tetrahedral mesh from 3D image surface

I have a 3D Y-Shape hollow tube, not so good surface.

 Import["http://dl.dropbox.com/u/68983831/tube02.vtk", "Graphics3D"]


I tried to use following vertex data plot and generate mesh.

pts = Import["tube02.vtk", "VertexData"];
Graphics3D[Point@pts]


Question: How to plot a smooth surface from vertex data and then generate tetrahedral or simple mesh? I was trying to use following thread to solve my problem: How to calculate volume of convex hull and volume of a 3D object and My donut has holes in it!.

• You've tried looking into the TetGenLink tutorial? Jun 21, 2012 at 23:39
• @J.M., TetGen will not help here - at least not directly. The shape has holes. ListSurfacePlot3D is what should be able to do it... but this one is tricky.
– user21
Jun 22, 2012 at 0:09
• Things are actually even worse than I thought since the example surface also intersecting surfaces. I think the only way to go from this one is from the points.
– user21
Jun 22, 2012 at 2:34

Here is an (imperfect) starting point for how to use ListSurfacePlot3D with this example. It needs manual refinement, but I only have time for this quick test:

pts = Import["http://dl.dropbox.com/u/68983831/tube01.vtk",
"VertexData"];
Show[Map[ListSurfacePlot3D[#] &, Partition[pts, 300]]]


The idea is to break the over 6000 points in your shape into smaller chunks that are relatively simple to recognize. In your example data, there seems to be at least enough order in the point list that the chunking using a brutal Partition seems to work OK.

In general, you have to control the choice of the chunks more carefully.

The reason I do the Partition operation is that ListSurfacePlot3D has an easier time recognizing where the neighboring surface points are if you don't give it all the points at once.

The order of points passed to ListSurfacePlot3D doesn't matter, but a smaller chunk containing all neighboring points makes the plotting of the surface more reliable.