CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Loading .stl file with python shell in paraview (https://www.cfd-online.com/Forums/paraview/188083-loading-stl-file-python-shell-paraview.html)

New-to-CFD May 22, 2017 17:18

Loading .stl file with python shell in paraview
 
Hey there,

Having trouble loading an .stl file using python in paraview, very new to python syntax.

I have an object named object.stl and am attempting to bring into paraview using:

paraview.simple.STLReader(object.stl) but am unsure what to actually include in the brackets or how to specify to load that .stl file...please help!!

beral May 23, 2017 03:34

Activate the tracing function (Tools -> Start Trace), open the stl in the GUI with File -> Open). Stop tracing (Tools -> Stop Trace). In the opened window you see the python code for what you did in the GUI. This code can be used in the ParaView Python Shell.

And go through the tutorial (see other post), this will save you a lot of time and stress.

New-to-CFD May 23, 2017 12:31

much appreciated ill have a look


All times are GMT -4. The time now is 11:04.