|
[Sponsors] |
April 27, 2023, 08:18 |
Get vertices from stl-file
|
#1 |
New Member
Wilhelm Furian
Join Date: Apr 2023
Location: Berlin
Posts: 16
Rep Power: 3 |
Hey guys!
I'm relatively new to OpenFOAM and this forum, but I hope I follow all the rules with this question. I have a huge stl file (50GB) that I'm working on. I want to run blockMesh and snappy, but for this I need the vertices of the stl-file. Since it is so huge, I cannot open it in paraview to get the vertices - my paraview always crashes. At the moment, I use the numpy-stl package like this: Code:
import numpy from stl import mesh mesh = mesh.Mesh.from_file("my_stl_file") mesh.max_ Please help |
|
April 27, 2023, 08:52 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
I'm not sure to understand what you mean by vertices, but if you are interested in getting the bounding box of your STL in order to set your blockMesh size, you can use OpenFOAM surfaceCheck utlity.
Hope this helps, Yann |
|
April 27, 2023, 09:05 |
|
#3 |
New Member
Wilhelm Furian
Join Date: Apr 2023
Location: Berlin
Posts: 16
Rep Power: 3 |
Yeah, that's it! I meant to extract the bounding box (in the blockMeshDict it's under 'vertices') and surfaceCheck seems to do exactly that! Thanks a lot!!
|
|
April 27, 2023, 09:47 |
|
#4 |
New Member
Wilhelm Furian
Join Date: Apr 2023
Location: Berlin
Posts: 16
Rep Power: 3 |
And it really is much faster than the numpy-stl solution! So thanks again, Yann!
|
|
Tags |
blockmesh, openfoam, stl file |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 02:22 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |