CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Saving a delaunay 2D mesh to .vtk

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2013, 18:42
Default Saving a delaunay 2D mesh to .vtk
  #1
New Member
 
Join Date: Jul 2010
Posts: 19
Rep Power: 16
RicardoGoncalves is on a distinguished road
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
RicardoGoncalves is offline   Reply With Quote

Old   August 21, 2013, 11:17
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings RicardoGoncalves,

Have you tried applying the filter "Extract Edges" and then saving to VTK the result of that filter?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 21, 2013, 11:31
Default
  #3
New Member
 
Join Date: Jul 2010
Posts: 19
Rep Power: 16
RicardoGoncalves is on a distinguished road
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
RicardoGoncalves is offline   Reply With Quote

Old   August 21, 2013, 18:12
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
delaunay, edges, paraview, triangles, vtk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 05:38
[Gmsh] Problem in mesh saving Jibran OpenFOAM Meshing & Mesh Conversion 2 May 24, 2017 11:32
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
varying curve mesh spacing at icem surface-mesh? mirko_r ANSYS Meshing & Geometry 6 January 14, 2010 13:23


All times are GMT -4. The time now is 00:57.