[Gmsh] Problem meshing .STL file from CAD software

David Colignon David.Colignon at ulg.ac.be
Tue May 9 11:28:18 CEST 2006


Hi David,

here is how I proceed :

1) gmsh abcd.geo test02.stl  ( the abcd.geo file does'nt exist yet )

2) Mesh -> STL -> Remesh

3) Geometry -> Physical -> Add -> Line  and/or  Geometry -> Physical -> Add -> Surface . The selected surfaces and lines are added in the abcd.geo file.

4) File -> Save Mesh . The mesh with the right physical numbers is saved as abcd.msh


Now to check these physical lines/surfaces, you can use

gmsh  abcd.geo  test02.stl  and Tools -> Visibility and choose Physical instead of Elementary in the Browser drop-down menu to see the physical lines ans surfaces you defined.

you can also use 

gmsh  abcd.geo  abcd.msh  and  Tools -> Visibility and choose Physical instead of Elementary in the Browser drop-down menu. But to see the Physical lines you have to check Tools -> Options -> Mesh -> Visibility -> Line Elements !
You also will get some Errors messages in the Message Console window  (Error   : Wrong orientation of element 1 in curve 28 , ...) that I don't understand, I will ask to Christophe...

Regards,

Dave




Dave,

Thanks for the quick reply:  I'm not on my computer at home for a bit, so I don't have the error files.  I'm sending the .stl file though.  I'll explain the problem I'm encountering, because it may not be a program error as much as a user error:

I'm making .stl files in Solidworks (see the attached .stl file).  I want to then create physical surfaces, and eventually a physical volume (I understand that I have to make that on my own in the .geo file), so that my exported mesh will have labeled boundary elements, for recognition in the CFD software OpenFlower (which is designed to accept Gmsh .msh files).  When I export physical surfaces, I only get the surface, and no lines.  When I try to export the lines (which is tedious to do one at a time), there are errors stating that the line is not defined by two end-points.  Yet, I can pull down the Visibility viewer in Tools>Visibility, and see all of the elementary points, lines and surfaces defined.  How do I go about making physical surfaces of the .stl I've attached, without the problems I am seeing?  Thanks for your help/clarification!

Regards,

David


David Gasperino wrote:
> First-off, this software is well designed and quite user-friendly,  
> and I hope I can use if for some time to come to mesh my CAD .stl  
> files.  But, I am having a problem:
> 
> I use Solidworks to generate my project geometries, and export the  
> surfaces as .stl files.  Listed below is my procedure for attempted  
> meshing of these files:
> 
> 1.) open .stl files using GMSH
> 2.) click "remesh" in the Mesh>STL section of the GUI to generate the  
> surface mesh
> 3.) Initiate the 3D mesh
> 
> I then receive an error, using all three different 3D meshers,  
> relating to problems with the surface mesh.  I have a few questions:   
> Is my procedure above correct for meshing an .stl file?  If not, then  
> what is the correct procedure?  It seems like there isn't that much  
> documentation on the .stl import feature, am I missing something?
> 
> Thanks in advance for your help-
> 
> David
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test02.STL.zip
Type: application/zip
Size: 19078 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20060509/a3577918/attachment.zip>