CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[surface handling] Command line tool for finding the bounding box of an STL file

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By fvallejog
  • 2 Post By KillerBee

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2008, 12:20
Default Command line tool for finding the bounding box of an STL file
  #1
Member
 
Terry Barnaby
Join Date: Mar 2009
Location: Beam Ltd, UK
Posts: 44
Rep Power: 17
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: 27
Rep Power: 17
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: 237
Rep Power: 18
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: 17
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: 17
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: 17
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: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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   August 7, 2016, 23:09
Default bounding box
  #8
New Member
 
Fidel Vallejo
Join Date: Dec 2015
Location: Santiago
Posts: 7
Rep Power: 10
fvallejog is on a distinguished road
checkMesh | grep -i 'bounding box'
bored_bot likes this.
fvallejog is offline   Reply With Quote

Old   November 4, 2016, 14:09
Default Bounding Box
  #9
New Member
 
Amir
Join Date: Oct 2016
Posts: 4
Rep Power: 10
KillerBee is on a distinguished road
type: surfaceCheck yourFigure.vtk | grep -i 'bounding box'
LeeRuns and bored_bot like this.
KillerBee is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


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