[vtkusers] Specifying cells with names

David E DeMarle dave.demarle at kitware.com
Mon Feb 20 07:53:35 EST 2012


Try adding a vtkStringArray
(http://www.vtk.org/doc/release/5.0/html/a02052.html) to the
vtkPolyData's vtkCellData arrays. Assuming the older vtk format
readers and writers respect that data type then you should be all set.
If not, try the newer vtk xml file format readers/writers they most
likely do.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Mon, Feb 20, 2012 at 7:10 AM, Brett Tully <brett.tully at oxyntix.com> wrote:
> Dear all,
>
> We run a numerical simulation platform and are investigating the possibility
> of switching to VTK as our primary file format. One of the things we need to
> be able to do is identify cells of PolyData (specifically lines in 2D, or
> polys in 3d) by name. For instance, if we have a 2D simulation shaped like a
> box -- we would like to be able to label one of the boundaries 'inlet' and
> another 'outlet'. I have spent quite a bit of time looking around the web
> without luck -- can anyone here point me in a direction for more
> information? (I am currently trying to track down a copy of the VTK User's
> Guide).
>
> One of the ideas we have talked about is having a separate file for each
> boundary, but this seems like a bit of a hack.
>
> Regards,
> Brett.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list