Saving a delaunay 2D mesh to .vtk
I'm trying to save a 2D delaunay mesh to vtk in paraview, but it only saves the points and polygons (that is 3 points for each polygons). What I really need are the edges (for each edge the pair of points), and for each triangle the three edges. Any suggestions?
Have you tried applying the filter "Extract Edges" and then saving to VTK the result of that filter?
Thanks Bruno. Yes, I tried, but in this case the vtk file has only the "points" and "lines" (edges). What I need is something like the output of Triangle mesh generator (http://www.cs.cmu.edu/~quake/triangle.html) that defines i) the triangular cells by the indexes of the three edges:
cell1 edge1 edge2 edge3
cell2 edge4 edge5 edge7
and ii) defines the edges by the two points
edge1 point1 point2
edge2 point4 point9
and potentially the connection between cells:
edge1 cell2 cell3
edge2 cell6 cell9
Well... from your description, I think that specific format is hard to come by.
One possibility is that you export to the ".PLY" format, which saves the points and then the connections between the points by index, not by their direct points, as STL does.
But a format that uses the edges as the reference geometry, I can't remember or I simply don't know any format that does this on ParaView. My best bet would be for you to create a Python script on ParaView or VTK and export the data as you need.
One reference I can remember of is the "vtkPolyData" Python example scripts that VTK has got: http://www.vtk.org/doc/nightly/html/..._e_vtkPolyData - those examples usually create the polydata and then manipulate it, so you'll have to think backwards, namely to see the way it stores the points and the cell connections and then extract the data from "vtkPolyData".
By the way, I'm not very familiar with it, but the variant ParaViewGeo comes to mind: http://paraviewgeo.objectivity.ca/do...er-manual/home - which is a variant dedicated to people on the Research, Mining, Geoscience and Exploration. They provide some more features beyond the standard ParaView, so with any luck, one of those features might come in handy.
|All times are GMT -4. The time now is 03:18.|