Hi,
What is the reason for pruning the structure in the "Extract Block" filter
when there is only one child item? I output the following structure from
the custom reader:
- output (multi-block dataset)
- zone 1 (multi-block dataset)
- volume (unstructured grid)
- boundaries (multi-block dataset)
- blade (poly data)
- hub (poly data)
- case (poly data)
- zone 2 (multi-block dataset)
- volume (unstructured grid)
- boundaries (multi-block dataset)
- blade (poly data)
- hub (poly data)
- case (poly data)
If I were to extract both the blades then the resulting structured would be:
- output (multi-block dataset)
- blade (poly data)
- blade (poly data)
This has now lost all the information from the original structure.
Commenting out the section for the case when there is only one child item
fixes this for me:
8<--------------------------------------------------------------------------------------------------
Index: ./VTK/Graphics/vtkExtractBlock.cxx
===================================================================
RCS file: /cvsroot/ParaView3/ParaView3/VTK/Graphics/vtkExtractBlock.cxx,v
retrieving revision 1.6
diff -r1.6 vtkExtractBlock.cxx
239,251c239,251
< vtkMultiBlockDataSet* prunedBlock =
vtkMultiBlockDataSet::SafeDownCast(block);
< if (prunedBlock && prunedBlock->GetNumberOfBlocks()==1)
< {
< // shrink redundant branches.
< clone->SetBlock(index, prunedBlock->GetBlock(0));
< if (prunedBlock->HasMetaData(static_cast<unsigned int>(0)))
< {
< clone->GetMetaData(index)->Copy(prunedBlock->GetMetaData(
< static_cast<unsigned int>(0)));
< }
< }
< else
< {
---
> // vtkMultiBlockDataSet* prunedBlock =
vtkMultiBlockDataSet::SafeDownCast(block);
> // if (prunedBlock && prunedBlock->GetNumberOfBlocks()==1)
> // {
> // // shrink redundant branches.
> // clone->SetBlock(index, prunedBlock->GetBlock(0));
> // if (prunedBlock->HasMetaData(static_cast<unsigned int>(0)))
> // {
> // clone->GetMetaData(index)->Copy(prunedBlock->GetMetaData(
> // static_cast<unsigned int>(0)));
> // }
> // }
> // else
> // {
257c257
< }
---
> // }
-------------------------------------------------------------------------------------------------->8
Could this case be removed in the main CVS or is there a good reason for
keeping it? (maybe an option could be added for it....)
Thanks,
Paul
_______________________________________________
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 ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview