[vtkusers] Single proxy class for a vector of vtkUnstructuredGrids

Andrew Parker andy.john.parker at googlemail.com
Mon Jun 11 04:37:54 EDT 2012


Hi,

I have several vtkUnstructuredGrid(s) that I read in from disk, they are
separate components of a large model.  For various reasons I'd like to be
able to keep them separate but, for the majority of my program proxy them
all by one interface as one single "glued" object of that type, in this
case a single vtkUnstructuredGrid.  For example, if I have a file that I
read in for a nut, and a second file for a bolt, I would like them to
remain separate, but pass around an object that allowed me to do, say
GetPoints(), on a single vtkUnstructuredGrid object that gave me all the
points in both the nut and bolt meshes.  Actually, I would like to in a
sense have the whole interface for vtkUnstructuredGrid and
anything beneath it, but behind hold a vector of vtkUnstructuredGrids, or
indeed another type, vtkpolydata for example.

Is this possible?  I do not think the vtkMultiBlock... is what I want.
 Alternatively, if this is not possible, is there anything that will allow
me to "add" using operator+ for example the nut and bolt together to get a
single mesh back.  This is not really what I want but would suffice.

I would much prefer the former, but the latter is fine if the former is not
possible.

Any help much appreciated.  Again, primary importance is one interface that
under the hood is a vector of said types, where that type need not be a
vtkunstructuredGrid, but that would be ideal initially....

Cheers again,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120611/e42eb189/attachment.htm>


More information about the vtkusers mailing list