[Paraview] writing a bunch of polyhedrons
Tomislav Maric
tomislav.maric at gmx.com
Wed Jun 29 05:09:09 EDT 2011
Hi everyone,
I have a list of polyhedrons which have arbitrary shape, and I would like to write them all down
into a single .vtk file. I am using the POLYDATA data set. Right now, my option is:
init global points
init global faces
for all polyhedra:
get local points
get local faces
add local points to global points
map+add local faces to global faces
open the file for writing
write the .vtk header for POLYDATA
for all points:
write the points
for all faces:
write the polygons
Is it possible to make this more effective? Right now I am duplicating my information when copying/mapping
to global lists. If I want to write into this file without copying the polyhedron data, I will still need
a memory buffer to store the file from the insertion point on, and it would be needed twice for each
polyhedron:
file::seek up
write the points
file::seek down
write the faces
and at the end, I would need to insert the
POINTS nPoints dataType
and
POLYGONS n size
at apropriate places.
Any advice would be appreciated! :)
Thanks!
More information about the ParaView
mailing list