|
[Sponsors] |
[snappyHexMesh] snappyHexMesh makes too many patches from STL? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 26, 2022, 18:41 |
snappyHexMesh makes too many patches from STL?
|
#1 |
New Member
David
Join Date: Dec 2021
Posts: 4
Rep Power: 5 |
When trying to create a mesh with sHM from an STL file, thousands of patches and regions are generated - too many!
Adding patches for surface regions: ---------------------------------- Patch Type Region ----- ------ ------- model10m; 6 wall model10m_patch0 7 wall model10m_patch1 8 wall model10m_patch2 ... 30000 wall model10m_patch30000 The meshing process should take a few minutes, but when this issue occurs, it can take hours to generate the same mesh. I found that is issue occurs when an STL is encoded in binary. When the STL is encoded in ASCII, this issue does not occur. To prevent this issue, you can open the mesh in software like AutoCAD Fusion, import the binary STL, and save the STL as ASCII (which you can open with a simple text editor). I have solved my own problem but I thought I should post the question and solution here, as I could not find anything to help troubleshoot the problem. |
|
June 22, 2022, 02:05 |
|
#2 |
New Member
Clemens Goessnitzer
Join Date: Nov 2021
Posts: 6
Rep Power: 5 |
Hi dbazz!
Did you find out what the problem was? |
|
June 22, 2022, 10:05 |
|
#3 |
New Member
David
Join Date: Dec 2021
Posts: 4
Rep Power: 5 |
Yes - the STL I was working with was in binary format. It needs to be in ASCII format to be friendly with SHM tools
|
|
June 22, 2022, 10:56 |
|
#4 |
New Member
Clemens Goessnitzer
Join Date: Nov 2021
Posts: 6
Rep Power: 5 |
Okay, I want to stay with the binary format, since it is much faster, smaller in file size and more precise. I can live with the many patches now, since in my case there are only two, and not 10,000s.
Thanks for your answer. |
|
July 13, 2022, 08:54 |
|
#5 |
New Member
Clemens Goessnitzer
Join Date: Nov 2021
Posts: 6
Rep Power: 5 |
Update: If you set the attribute to another value than 0, you will get as many patches as you set the number of attributes:
https://bugs.openfoam.org/view.php?id=3860 If you use numpy-stl, you can set the attribute to 0 by mesh.attr = 0 That resolved my problem. |
|
Tags |
ascii binary format, patches, regions, snappyhexmesh, stl |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." | lethu | OpenFOAM Meshing & Mesh Conversion | 1 | June 3, 2020 08:49 |
[mesh manipulation] createpatch not working when using layer addition in snappyHexMesh | Dikkeunit | OpenFOAM Meshing & Mesh Conversion | 0 | February 3, 2020 10:46 |
[snappyHexMesh] Creating baffes with snappyHexMesh | BBack | OpenFOAM Meshing & Mesh Conversion | 0 | September 22, 2019 06:10 |
[surface handling] How to make boundary patches in STL file | nzy102 | OpenFOAM Meshing & Mesh Conversion | 4 | January 22, 2018 16:03 |
[snappyHexMesh] Patch Names in STL file for snappyHexMesh | Kattie | OpenFOAM Meshing & Mesh Conversion | 11 | October 18, 2011 12:05 |