[vtkusers] vtkMultiBlockDataSets: Pipeline does not get updated in Release 8

Heller, Bastian bastian.heller at isko-engineers.de
Thu Jan 11 00:45:35 EST 2018


Hello everyone,

i am developing a tool where I need to visualize geometries consisting of multiple (>100) blocks as unstructured grids. In order to handle these structures efficiently, i’d like to use vtkMultiBlockDataSets. Geometries are extracted using a vtkGeometryFilter, connected to a vtkCompositePolyDataMapper2. The code I am using to link the elements is as follows:

vtkSmartPointer<vtkCompositeDataPipeline> exec =
                vtkSmartPointer<vtkCompositeDataPipeline>::New();
vtkAlgorithm::SetDefaultExecutivePrototype(exec);

/* Create a display attributes set for the mapper */
vtkSmartPointer<vtkCompositeDataDisplayAttributes> spAttribs =
                vtkSmartPointer<vtkCompositeDataDisplayAttributes>::New();

/* Datasets */
vtkSmartPointer<vtkMultiBlockDataSet> _spMbMeshes =
                vtkSmartPointer<vtkMultiBlockDataSet>::New();
_spMbMeshes->SetNumberOfBlocks(0);

/* Filters and mappers */
vtkSmartPointer<vtkGeometryFilter> _spMeshFilter =
                vtkSmartPointer<vtkGeometryFilter>::New();
vtkSmartPointer<vtkCompositePolyDataMapper2> _spMeshMapper =
                vtkSmartPointer<vtkCompositePolyDataMapper2>::New();
vtkSmartPointer<vtkActor> _spMeshActor = vtkSmartPointer<vtkActor>::New();

/* Create connections */
_spMeshMapper->SetCompositeDataDisplayAttributes(spAttribs);
_spMeshFilter->SetInputData(this->_spMbMeshes);
_spMeshMapper->SetInputConnection(this->_spMeshFilter->GetOutputPort());
_spMeshActor->SetMapper(this->_spMeshMapper);

/* Add actors to renderer */
_spRenderer->AddActor(this->_spMeshActor);

Now, when I add blocks to the multiblock (_spMbMeshes), in VTK 7.1.1, everything executes correctly and the elements are shown. However, when I switch to VTK 8.1, only one of the datasets I added will be shown (which seemed to be the last one added to the block). I didn’t find any information in the changelogs, regarding this issue.

My question: Where am I going wrong and what do I have to change to make this code work in VTK 8? Thank you very much in advance.

Yours,

Bastian



Bastian Heller

CAE Prozesse und Optimierung - Services & Development

ISKO engineers AG
Marie-Curie-Straße 2, 85055 Ingolstadt
Fon: +49 8458 3112-286
Fax: +49 8458 3112-199

Mail: bastian.heller at isko-engineers.de


[cid:image6d0d3a.JPG at 14162914.41988cf9]<http://www.simuspace.de>



http://www.isko-engineers.de
http://www.simuspace.de

Folgen Sie uns auf:
[Xing]<https://www.xing.com/companies/iskoengineersag> [Twitter] <https://twitter.com/iskoengineers>  [Google Plus] <https://plus.google.com/b/105540746852550185996/+isko-engineersde/posts?gmbpt=true&pageId=105540746852550185996&hl=de>



Sitz der AG: D-80807 Muenchen, Registergericht Muenchen HRB 129 078
Vorsitzender des Aufsichtsrates: Michael Welzel
Vorstand: Michael Probst, Michael Krause
USt-IdNr.: DE 812 837 909


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180111/3da9526b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image6d0d3a.JPG
Type: image/jpeg
Size: 34269 bytes
Desc: image6d0d3a.JPG
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180111/3da9526b/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image506c05.PNG
Type: image/png
Size: 1089 bytes
Desc: image506c05.PNG
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180111/3da9526b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image87cf75.PNG
Type: image/png
Size: 696 bytes
Desc: image87cf75.PNG
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180111/3da9526b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image5ed8f8.PNG
Type: image/png
Size: 819 bytes
Desc: image5ed8f8.PNG
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180111/3da9526b/attachment-0002.png>


More information about the vtkusers mailing list