[Paraview] How to extract one face from an hexa in python ?

houssen houssen at ipgp.fr
Tue Sep 8 11:22:17 EDT 2015


No idea ? No known python example / code snippet ?

Franck

Le 2015-09-07 9:42, houssen a écrit :
> How to extract one face from an hexa in python ?
>
> I have an hexa read from an xmd file. In the ParaView GUI, I use the
> ExtractSurface filter to get the skin of it. Then I select one face.
> Then I use the ExtractSelection filter : I get the face extracted as 
> I
> need (without error message).
>
> OK, now I need to do that with python scripting : if somebody has the
> corresponding code snippet I'd appreciate to get it (filter creation
> is OK. What I don't know is how to select a face from the hexa 
> surface
> in python). I activated "tools / start trace (+ general option : all
> properties)" to get an idea of the python code. When I create the
> ExtractSurface filter, I get :
> Traceback (most recent call last):
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 1212, in _create_trace_item_internal
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 881, in __init__
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 162, in get_accessor
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 183, in create_accessor
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/simple.py",
> line 680, in GetActiveSource
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/simple.py",
> line 1690, in get_source
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/simple.py",
> line 1684, in __convert_proxy
>     servermanager._getPyProxy(px.GetSourceProxy()),
> AttributeError: GetSourceProxy
> Then, I select a face and I create an ExtractSelection filter, I get
> another error and ParaView crashes :
> Traceback (most recent call last):
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 1212, in _create_trace_item_internal
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/smtrace.py",
> line 1063, in __init__
>   File
> 
> "/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/site-packages/paraview/servermanager.py",
> line 2418, in _getPyProxy
>     xmlName = smproxy.GetXMLName()
> AttributeError: GetXMLName
> *** Error in
> 
> `/home/houssen/Programs/ParaView/ParaView-v4.3.1-source/local/lib/paraview-4.3/paraview':
> free(): invalid pointer: 0x00007efcddf97240 ***
> Abandon (core dumped)
>
> This crash is maybe related to the ParaView build ? I run
> Ubuntu-14.04, ParaView-4.3.1 has been built from source without any
> specific / triky option (or some basic options like cmake
> -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON
> -DModule_vtkIOXdmf3:BOOL=ON) : do I have to turn on some option(s) at
> build time to avoid the crash ? I attached the CMakeCache file.
>
> Franck



More information about the ParaView mailing list