CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How can I find dimension of STL file?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2023, 05:56
Default How can I find dimension of STL file?
  #1
Member
 
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 57
Rep Power: 4
songyi719 is on a distinguished road
Hi, I am trying to do some car aerodynamic sim using openfoam, but problem is that stl file of car isn't aligned to be on ground.



Which means, xyz origin of file is somewhere inside the car.


But in order to stick this car on ground (well, cars don't fly) I should place wheel of this car on xy plane, or at least find out z value of wheel surface.


How would I be able to find out such data from stl file?
songyi719 is offline   Reply With Quote

Old   February 6, 2023, 06:01
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by songyi719 View Post
Hi, I am trying to do some car aerodynamic sim using openfoam, but problem is that stl file of car isn't aligned to be on ground.



Which means, xyz origin of file is somewhere inside the car.


But in order to stick this car on ground (well, cars don't fly) I should place wheel of this car on xy plane, or at least find out z value of wheel surface.


How would I be able to find out such data from stl file?


There are lots of examples of stl file loaders on net if i am not mistaken. I would just read the stl myself and calculate the center by some C++ or C code.
arjun is offline   Reply With Quote

Old   February 6, 2023, 06:11
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
You should be able to import the STL in Paraview or Meshlab, find out the bounding box of the STL, notice the zmin of the bounding box and finally translate the STL along z so that z_translation = - zmin.
arjun likes this.
sbaffini is offline   Reply With Quote

Old   February 6, 2023, 15:56
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Note, however, that this is just the formal answer to your question. This is probably going to give you troubles somewhere along the road, besides being unphysical. It is common instead to have some compenetration between wheels and ground that is more close to the physical reality and better for meshing purposes.
sbaffini is offline   Reply With Quote

Reply

Tags
stl


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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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