I'm trying to plot a (2D) mesh in wireframe mode and then on top of that
plot a single element in yellow with a script in python with ParaView 3.4.
My thought was to use the threshold plot, but it seems not to plot anything
but blank. This is what I've gotten so far. Any ideas? Also, is there any
good reference material out there for ParaView's python API?
# load mesh and create a view
if not ActiveConnection:
connection = Connect()
exo = sources.ExodusIIReader(FileName='mesh.e')
exo.UpdatePipelineInformation()
view = CreateRenderView()
# now make a threshold with GlobalElementId and plot element 10
elementID = 10
tf = filters.Threshold(Input=exo,
ThresholdBetween=[elementID,elementID],SelectInputScalars=["GlobalElementId"])
tf.UpdatePipeline()
rep = CreateRepresentation(exo, view)
rep.Representation = 1 # 1=wireframe
view.ResetCamera()
view.StillRender()
Thanks,
Jay
_______________________________________________
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