Re: [Paraview] How to test for empty block in multi-block dataset
Hi Dennis, I think something like: if multiblock.GetBlock(i) != None: ... should work. You probably don't even need the "!=None" part. Cheers, Andy On Wed, Oct 18, 2017 at 10:41 AM, Dennis Conklin < dennis_conk...@goodyear.com> wrote: > P.S. I’m writing python inside a Programmable Filter > > > > Thanks again > > Dennis > > ___ > 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 > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/paraview > > ___ 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
Re: [Paraview] How to test for empty block in multi-block dataset
P.S. I'm writing python inside a Programmable Filter Thanks again Dennis ___ 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
[Paraview] How to test for empty block in multi-block dataset
All, I have a number of filters that process all the blocks in a multiblock dataset. If I perform some preliminary processing, such as thresholding, I might end up with some empty blocks (contain no elements satisfying the Threshold, for instance) When I try to process an empty block, it kills Paraview. I tried testing for block.GetNumberOfCells()>0, but calling GetNumberOfCells() on an empty block seems to kill Paraview all on it's own. Is there a test I can do to detect an empty block without killing the program? Thanks Dennis ___ 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview