I have created a pipe line to define some cell clusters. (pipe line in image)
I want to remove any cell clusters where a cluster member is on a selected patch (the patch is shown as a pink wire frame in the image). Meaning that the regionID=0 (navey blue “L” shaped region) should be removed from the selected data.
I am trying to obtain a list of all cells on the patch, then I could obtain the region IDs present and remove these from my analysis. However, I can’t work out how to obtain all cells on a patch, I’ve not found an Extract XXXX filter that does this. Note this is imported as a multi-block domain, and then merged during my pipeline.
I’m sure there are other ways to do this but can’t work them out. eg. obtain lists of all cell ID numbers on the surface, then scan all clusters, and if an ID matches remove the cluster. Again I’m stuck in how to obtain a list of the cell IDS.
I’m happy for any answer to be filter based or use python scripting.
Sound like you should be able to select the cells you want to remove or keep in Edit -> FindData.
Once they are selected, Extract Selection should de the job.
Thanks for the help, what you propose should work, however when I try and select the cells with Find Data I get an error. This is for a simple case where i import my multi-block data and then try to select the cells on the Block ID associated with my patch (Block ID = 7).
What am I doing something wrong?
Please use ParaView from : https://www.paraview.org/download/
And share a dataset to reproduce the issue please.
I tried to install paraview on ubuntu run on windows. I get some graphics driver errors which I’ve not been able to solve.
Therefore I tried installing paraview on windows. Eventually I will want to run it on Linux, but at the point I need to do this I should have more support to resolve the driver/environment variable issues i’m having.
I’m having some issues with the windows installation. I had assumed that scripts which worked on the linux (paraFoam) would also work on the windows install, but i’m having problems.
a) a script (“TEST.py”) ran on the linux install now gives the error on the windows install:
SyntaxError: invalid syntax
File “”, line 152
spreadSheetView1.BlockSize = 1024L
SyntaxError: invalid syntax
b) If I reduce the “TEST.py” script to just importing the data (lines 1-23). When I view the imported data in the GUI the screen turns to this as soon as I hit the view (eye icon). Making it impossible to use any of the menus. I get exactly the same result no matter what size I set the view to (renderView1.ViewSize = [800, 400])
**I’ve got the windows graphics issue resolved with an update of the graphics card driver **
Weird display resolution
On the positive side it seems that the python selection module is not importing correctly. Its just hard for me to visually confirm my script is working with the GUI issue.
Here is the data and the script I’ve been using
Data.zip (1.9 MB)
TEST.py (4.7 KB)
Now on the latest windows release i get this error:
File "C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\detail\python_selector.py", line 79, in execute
maskArray = calculator.compute(inputs, query, ns=elocals)
File "C:\Program Files\ParaView 5.8.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\detail\calculator.py", line 146, in compute
retVal = eval(subEx, globals(), mylocals)
File "<string>", line 0
SyntaxError: unexpected EOF while parsing
Your query is not complete, however it looks like the block selection is not working anyway.
You should be able to work around it using a connectivity filter though.
Thanks for digging into this.
Its not clear to me how I can work around this with the connectivity filter. My data is multi-block. Once merged I can select the connectivity filter. However I’m not able to select the Block ID. Do you have any further pointers on how to get around this with the connectivity filter?
Another work around is to use the MultiBlockInspector directly :
- View -> MultiBlockInspector
- Click on the block you want to extract
Another workaround is to use the select block feature :
- Click on the select block button :
- Click on the block you want to select in the render view
Does anyone have any idea how to extract the 3D cells forming the patch surface? I can get the 2D cells, but not the 3D on a surface.
Alternatively, how do I obtain a the 3D cell, which a specified 2D cell is part of?
There is no direct way to do that, but if you know where your surface is, you can just use Select Cells on.