[Gmsh] Problem meshing .STL file from CAD software

David Colignon David.Colignon at ulg.ac.be
Thu May 11 12:31:39 CEST 2006


Hi,

I work only with Windows and Linux, no idea about Mac ...

If you look in the Visibility window you will see that the lines are simply numbered from 1 to 85, and if you look at the .geo file which is generated after you define the physical lines by hand with the interface, you see that the syntax is very simple and that all the physical lines are also numbered sequentially.
My suggestion is that you edit yourself (or write a program or a script that will do it for you) the part of the .geo file related to the physical lines...

(I am working at the University of Liege in Belgium, Europe)

Cheers,

Dave

-- 
David Colignon, Ph.D.
ELAP - Service d'Electricité Appliquée
Institut Montefiore B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
http://elap.montefiore.ulg.ac.be



David Gasperino wrote:
> Dave,
> 
> Thanks for the help, although I still have a few questions:
> 
> I'm running Gmsh on a mac, how can I execute Gmsh from the command line, 
> I only have a Gmsh.app file?  Also, when I select physical lines, do I 
> have to select each line separately?  If you saw the .STL file I sent, 
> it has many lines (hundreds), which are necessary to properly translate 
> the actual file to an STL representation (I'm assuming this will be the 
> case in many geometries translated to STL).  I've attempted highlighting 
> all lines, but as predicted, that ends up making one large physical 
> line.  Is there no way around selecting each and every physical line 
> separately?  Thanks again for your help -- out of curiosity, are you 
> working at a University in the States?
> 
> Regards,
> 
> David
> 
> 
> On May 9, 2006, at 4:28 AM, David Colignon wrote:
> 
>> 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
>>>
> 
-- 
David Colignon, Ph.D.
ELAP - Service d'Electricité Appliquée
Institut Montefiore B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
http://elap.montefiore.ulg.ac.be