|
[Sponsors] |
August 20, 2013, 19:42 |
Saving a delaunay 2D mesh to .vtk
|
#1 |
New Member
Join Date: Jul 2010
Posts: 19
Rep Power: 16 |
Dear all,
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? Thanks |
|
August 21, 2013, 12:17 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings RicardoGoncalves,
Have you tried applying the filter "Extract Edges" and then saving to VTK the result of that filter? Best regards, Bruno
__________________
|
|
August 21, 2013, 12:31 |
|
#3 |
New Member
Join Date: Jul 2010
Posts: 19
Rep Power: 16 |
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 ... etc and ii) defines the edges by the two points edge1 point1 point2 edge2 point4 point9 etc and potentially the connection between cells: edge1 cell2 cell3 edge2 cell6 cell9 etc Many thanks |
|
August 21, 2013, 19:12 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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.
__________________
|
|
Tags |
delaunay, edges, paraview, triangles, vtk |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[Gmsh] Problem in mesh saving | Jibran | OpenFOAM Meshing & Mesh Conversion | 2 | May 24, 2017 12:32 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
varying curve mesh spacing at icem surface-mesh? | mirko_r | ANSYS Meshing & Geometry | 6 | January 14, 2010 14:23 |