|
[Sponsors] |
February 6, 2023, 06:56 |
How can I find dimension of STL file?
|
#1 |
Member
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 59
Rep Power: 4 |
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? |
|
February 6, 2023, 07:01 |
|
#2 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
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. |
||
February 6, 2023, 07:11 |
|
#3 |
Senior Member
|
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.
|
|
February 6, 2023, 16:56 |
|
#4 |
Senior Member
|
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.
|
|
Tags |
stl |
|
|
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 19:13 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 02:22 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |