CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

Saving a delaunay 2D mesh to .vtk

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 20, 2013, 18:42
Default Saving a delaunay 2D mesh to .vtk
  #1
New Member
 
Join Date: Jul 2010
Posts: 14
Rep Power: 7
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: 14
Rep Power: 7
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
[ICEM] Negative volume error in hybrid mesh siw ANSYS Meshing & Geometry 4 September 3, 2014 05:25
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
varying curve mesh spacing at icem surface-mesh? mirko_r ANSYS Meshing & Geometry 6 January 14, 2010 14:23
basic of mesh refinement arya CFX 4 June 19, 2007 12:21


All times are GMT -4. The time now is 09:15.