Pergunta

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 simulation shaped like a box -- we would like to be able to label one of the boundaries 'inlet' and another 'outlet'.

Just wondering if anyone might have any ideas about how to achieve this? One thing we have thought of, is to use independent files for each boundary, but this seems a bit like a hack...

(Preferably using the XML file formats too)

Foi útil?

Solução

A vtkStringArray is one way, the other is to extend the reader/writer classes to add your own XML tags. In the end, we selected to have a sidecar file, with integer flags in the VTK cell data.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top