|
[Sponsors] |
[CAD formats] beginners how to convert binarySTL to asciiSTL with regions (good for SHM tutorial) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 24, 2012, 17:29 |
beginners how to convert binarySTL to asciiSTL with regions (good for SHM tutorial)
|
#1 |
New Member
|
Since I would like to try this tutorial,
http://www.cfd-online.com/Forums/ope...e-stlfile.html my problem is to start this tutorial, since I do not have asciiSTL of my geometry. It also has to be divided into regions. I found the way, I would like to share how to do this. Maybe it will be useful to kind of beginner like me. Solution combines using Freecad + enGrid. FreeCAD part of solution (how to export model to STL) I create my model (a pipe) in FreeCAD. (maybe there is a way, how to name faces of the model and export them to asciiSTL too, but I do not know nowadays). After making a model consisting of several parts I use boolean operations to make one fusion of them all. choose one to create mesh of the surface:
Now you can export mesh as STL. FreeCAD can export both binary and ascii STL. Ascii STL have the file extension .ast (just rename it to stl then). You will do it by selecting Mesh in Tree view and menu > Meshes > Export mesh where you choose Binary STL and save the mesh. Since I will use enGrid (ver. 1.3beta) later, it is necessary the STL to be saved in binary format. I have a problem with enGrid to open ascii STL. No mesh will import. So that is the point. enGrid part (dividing mesh into several regions / patches) I use enGrid ver.1.3beta. Run one and
Loop this for all of boundaries you want to save as separated asciiSTL files:
Now I have files needed to start this tutorial with snappyHexMesh (Hope not to stuck.) http://www.cfd-online.com/Forums/ope...e-stlfile.html If there is a simplier way, I will appreceate you to share. Last edited by soonic; March 24, 2012 at 17:48. Reason: typo |
|
March 24, 2012, 19:42 |
|
#2 |
Senior Member
|
I think I'll try this the day after tomorrow but something is not clear to me…
In the first part you explain how to save a geometry as an ASCII .stl, something you could also do with paraview, meshlab (check this out if you don't know it yet!) and a lot of other free softwares… What's the engrid part for? Does it let you save a .stl file which would contains some "sub-surfaces"? Something like the motorbike tutorial, in which you have the motorbike.stl file that keeps all the nammings of the componing parts, such as the wheels, the scree and so on… Is that your aim? If that's the case this would be really great! I've been looking for a way to do this without expensive softwares for over a year! |
|
March 24, 2012, 20:25 |
|
#3 |
New Member
|
For me the aim is to create hexa-mesh to run my case, since my solution diverges on tet-mesh. And I do not know where exactly the problem is. Testing tutorial case with hex works, when I remeshed the geometry to tets, works not anymore. My case either. So I started to learn snappyHexMesh.
So backwards. I found a snappyHexMesh tutorial, where as a first step was "to have geometry splitted into so many region as different refinement levels are required.." following with editation of ascii STL to flag regions with names. I did not have such stl and do not know, what application to use to split a model to sub-surfaces, name them and save as stl. I used only FreeCAD where I created the geometry and basic mesh saved as stl. When you already have stl surface, just skip to enGrid part. I wanted to allow to somebody who will stuck on the question how to make stl geometry an idea / one of possibilities. There were times I didnt know too. I was trying several mesh applications (icl. MeshLab, gmsh) but none of them found perfect for my purpose. So I followed to enGrid which can save the loaded mesh as an aciiSTL. Task was how to load only a part of the complex mesh to be exported as separate stl, what was done using enGrid. That way you can split the whole geometry to several surface partialy. You wanted more, than enGrid does. The attached tutorial describes the way, how to combine several asciiSTL to one STL manualy, naming each region manualy. But some simple script would do that for you. BUT there are problems with enGrid in complex geometries where finding non-sharp edge or dividing one surface into two. It can not split surface into two subsurfaces. When you will have in your CAD model an edge, where you want to split the surface later, I think the basic stl triangulation will keep this edge, so splitting later will be possible. I am not sure if automatic-way (feature angle detection). You can pick cells separatly by one. When you have only basic surface triangulation it could work. EnGrid cant work with baffles when meshing, but I think in that phase of work with enGrid it should not be problem. And post-knowledge, check an asciiSTL exported from enGrid for decimal-point notation. I had to manually replace commas to dots. Maybe it is only my localization issue... If that is a solution what helps you, I am glad. Thank enGits too |
|
March 25, 2012, 05:17 |
|
#4 |
Senior Member
|
Thank you!
|
|
March 26, 2012, 17:13 |
|
#5 |
Senior Member
|
Ok, tried that. So, you are saving multiple files with different names, not the same file with different surfaces in it. You can still use an editor to concatenate this file though. That's rather interesting to me… don't know if paraview can do the same…
By the way: any way in engrid to select some triangles only? For sure you can do that in meshlab and then export the selected triangles as a .stl… |
|
March 27, 2012, 05:01 |
|
#6 |
New Member
|
in enGrid, you can pick one cell and set it a boundary code. When setting the boundary code, you can choose what will be set to that boundary code. See the six radiobuttons. There are options like *Only picked cell, *Only picked cell and neighbours. The option I use the most is *Process only visible cells what set the boundary code to the (visible) surface containing picked cell until the edge defined by Feature angle.
I must have a better look at meshLab sincerely Peter |
|
March 27, 2012, 05:09 |
|
#7 |
Senior Member
|
With meshlab you can do that. You can select cells within a rectangular region. Use ctrl, alt and shift as key modifiers when using this function.
|
|
March 27, 2012, 05:30 |
|
#8 |
Senior Member
|
Hi,
I think that this STL´s with multiple named faces is something that only few programs offer! If I am not wrong ANSA and icon FOAMpro have that capabilaty. Even if you take Catia you need a Script as a work around! But maybe in the future an other way is easier, as OBJ-files are sufficient for SHM as well as Bruno mentions. |
|
March 27, 2012, 05:39 |
|
#9 |
Senior Member
|
Also 3Matic offers that functionality. Anyway, once you've saved the .stl files it should be pretty easy to write a script that picks all these files, reads their names and concatenates them into a single file in which every subpart has the name of the generating file…
|
|
March 27, 2012, 11:05 |
|
#10 | |
Senior Member
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 17 |
Quote:
Cat 1.stl 2.stl 3.stl > final.stl Althougth i must beware you that the stl file created with this method won't work for extracting the edges. I still need the unmodified whole geometry file to do that. If somebody knows a nice way to export nurbs or splines to a sHM-readable edges i'd love to hear it. |
||
June 12, 2013, 16:30 |
|
#11 |
New Member
Join Date: Apr 2013
Posts: 1
Rep Power: 0 |
Soonic, your post was very helpful.
Thanks, Ehsan |
|
July 28, 2017, 16:46 |
|
#12 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
How do we start engrid in Ubuntu 16.04?
Quote:
|
||
Tags |
ascii binary stl shm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can you recommend a good beginners tutorial book | JCVTOL | ANSYS | 0 | December 4, 2009 07:51 |