CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [surface handling] Command line tool for finding the bounding box of an STL file (https://www.cfd-online.com/Forums/openfoam-meshing/61514-command-line-tool-finding-bounding-box-stl-file.html)

terrybarnaby November 26, 2008 11:20

Command line tool for finding the bounding box of an STL file
 
Hi does any one know of a command line tool in OpenFOAM or elsewhere that can print out the bounding box of an STL file's objects ?

I need to scale and offset an STL file that is input
from a web based interface prior to creating a mesh with snappyHexMesh.

Cheers

Terry

mediode November 26, 2008 12:08

I can not provide you with a c
 
I can not provide you with a command line tool, but such a task should easily be managable with vtk, www.vtk.org. It provides all you need.
m*

fra76 November 26, 2008 13:11

If the STL is ascii, do it you
 
If the STL is ascii, do it yourself! STL format is really trivial...

norman1981 November 26, 2008 13:27

Hi, you can use admesh tool
 
Hi,

you can use admesh tool to find out the bounding box of an STL file's object. It's a nice opensource code that you can download from the web. It is also really useful for a lot of other things like holes corrections, face normal reversing...

I think it's worth trying.. let me know :-)!

Regards

Norman

juanduque November 26, 2008 14:36

Load it with paraview and chec
 
Load it with paraview and check the statics.
It tells you the bounding box dimensions and the offset respect to the wcs!

terrybarnaby November 26, 2008 15:47

Thanks for all the replies. T
 
Thanks for all the replies.
The admesh utility seems to do the job for me as I need a non-interactive solution for a web based interface and I have binary STL files.
However I may need to move to using ASCII files as I was going to try using the new snappyHexMesh tool and the binary STL files generated by Blender do not work with it correctly.

olesen November 27, 2008 02:20

You could also use the surface
 
You could also use the surfaceCheck utility and parse its output?
It provides not only bounding box info, but also list how many different solid groups there are.

fvallejog August 7, 2016 22:09

bounding box
 
checkMesh | grep -i 'bounding box'

KillerBee November 4, 2016 13:09

Bounding Box
 
type: surfaceCheck yourFigure.vtk | grep -i 'bounding box'


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