CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] get coordinate bounds of a stl from ParaView using Python (https://www.cfd-online.com/Forums/paraview/141550-get-coordinate-bounds-stl-paraview-using-python.html)

CRI_CFD September 10, 2014 09:36

get coordinate bounds of a stl from ParaView using Python
 
1 Attachment(s)
Hello everyone,

I want to get the bounds of x, y and z coordinates from ParaView when I import an .stl file (see attachments, this is shown below the pipeline browser, in the Information tab) from a Python script.

Does anybody know how can I do that? In another formats I did:

object.GetDataInformation().GetBounds()

but if I do that now I obtain very high ranges(for example 1e266 as the upper bound for x,y and z), which is clearly wrong.

Any hints? It looks easier but I have no idea about how to do it. I googled it in several ways and I didn't find a suitable answer.

HELP PLEASE!!!!!

Thanks.

hancock September 15, 2019 14:11

Hi this may be too late but will be helpful to others

object.GetDataInformation().GetBounds()

is giving garbage value since it has not been updated. Update is by the following command and then ask for bounds

objectDisplay = Show(object, renderView1)
bound = object.GetDataInformation().GetBounds()

cheers


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