CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

Command line tool for finding the bounding box of an STL file

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 26, 2008, 12:20
Default Hi does any one know of a comm
  #1
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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
terrybarnaby is offline   Reply With Quote

Old   November 26, 2008, 13:08
Default I can not provide you with a c
  #2
New Member
 
mediode
Join Date: Mar 2009
Posts: 26
Rep Power: 8
mediode is on a distinguished road
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*
mediode is offline   Reply With Quote

Old   November 26, 2008, 14:11
Default If the STL is ascii, do it you
  #3
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
If the STL is ascii, do it yourself! STL format is really trivial...
fra76 is offline   Reply With Quote

Old   November 26, 2008, 14:27
Default Hi, you can use admesh tool
  #4
Member
 
norman1981's Avatar
 
Norman Del Puppo
Join Date: Mar 2009
Location: Hinwil, CH
Posts: 57
Rep Power: 8
norman1981 is on a distinguished road
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
norman1981 is offline   Reply With Quote

Old   November 26, 2008, 15:36
Default Load it with paraview and chec
  #5
New Member
 
Juan Fernando Duque Lombana.
Join Date: Mar 2009
Posts: 14
Rep Power: 8
juanduque is on a distinguished road
Load it with paraview and check the statics.
It tells you the bounding box dimensions and the offset respect to the wcs!
juanduque is offline   Reply With Quote

Old   November 26, 2008, 16:47
Default Thanks for all the replies. T
  #6
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 8
terrybarnaby is on a distinguished road
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.
terrybarnaby is offline   Reply With Quote

Old   November 27, 2008, 03:20
Default You could also use the surface
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
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.
olesen is offline   Reply With Quote

Old   November 11, 2013, 02:13
Default Commandline and Web-based tool for STL Volume and Bounding Box (length, width, height
  #8
New Member
 
PP
Join Date: Nov 2013
Posts: 1
Rep Power: 0
pX0r is on a distinguished road
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!
pX0r is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Latest Result File into Post via Command Line Karl CFX 2 February 8, 2010 07:28
restart a case with .trn file in command line way? wayne CFX 0 October 10, 2008 09:02
Load MDL file from command line Martin_Dirndorfer CD-adapco 2 July 30, 2008 10:57
Write .def file from command line Alejandro CFX 3 September 11, 2005 18:14
Change i/p mesh file on command line Johnson Mendonca FLUENT 0 September 2, 2004 12:08


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