CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Mesh Utilities (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/)
-   -   Command line tool for finding the bounding box of an STL file (http://www.cfd-online.com/Forums/openfoam-meshing-utilities/61514-command-line-tool-finding-bounding-box-stl-file.html)

terrybarnaby November 26, 2008 12:20

Hi does any one know of a comm
 
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 13: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 14: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 14: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 15: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 16: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 03: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.

pX0r November 11, 2013 02:13

Commandline and Web-based tool for STL Volume and Bounding Box (length, width, height
 
Hello,

Stumbled upon the following commandline and also web-based PHP tool for loading binary and ascii STL files. It can calculate the volume and bounding box (length, width, height) of the STL file.

For STL Bounding Box (length, width, height):
STL Bounding Box Calculator

For STL Volume:
STL Volume Calculator

Cheers!


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