[Gmsh] mesh problem

David Colignon David.Colignon at ulg.ac.be
Fri Dec 18 10:43:11 CET 2009


If you just open your step file with Gmsh, you can see that there are some warnings and some errors:

...
...
Info    : removing degenerated edge 0
Info    : removing degenerated edge 0
Info    : - fixing wire gaps
Info    : some 2D gaps fixed
Info    : some 3D gaps fixed
Info    : failed to fix some 2D gaps
Info    : failed to fix some 3D gaps
Info    : - fixing spot and strip faces
Warning : OCC STL triangulation failed
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Warning : OCC STL triangulation failed
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
Info    : OCC Region 1 - New Shell
Info    : OCC Region 1 with 2001 faces
Info    : Read '/Users/colignon/Desktop/newfile.stp'


but they are perhaps not "blocking".
In Tools -> Options -> Geometry -> General , Gmsh has some *basic* and *experimental* reparation features. You can 
increase the Tolerance, ...
But you should check and clean your geometry in your CAD software. For example, with Tools -> Visibility, and by 
displaying the surfaces with "ALT+s" you can see that for some reason Gmsh cannot display properly surface 903

If you use the command line to try to mesh your geometry in 2D, you will get much more messages which could help you to 
find the problems in your geometry (note that Gmsh crashes before the end)

ace35:~/Desktop >   gmsh newfile.stp -2

Info    : Running '/Applications/Gmsh.app/Contents/Resources/bin/gmsh newfile.stp -2'
Info    : Started on Fri Dec 18 10:32:01 2009
Info    : Reading 'newfile.stp'
   ***  Error on Record 4039 (on 440531 -> 0 % in File)  ***  Ident #2022
Complex Type incorrect : SOLID_ANGLE_UNIT / SI_UNIT ...
   ***  Error on Record 27742 (on 440531 -> 6 % in File)  ***  Ident #9776
Complex Type incorrect : RATIONAL_B_SPLINE_SURFACE / BOUNDED_SURFACE ...
   ***  Error on Record 27744 (on 440531 -> 6 % in File)  ***  Ident #9776
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ...
   ***  Error on Record 37721 (on 440531 -> 8 % in File)  ***  Ident #12125
Complex Type incorrect : NAMED_UNIT / LENGTH_UNIT ...
   ***  Error on Record 340757 (on 440531 -> 77 % in File)  ***  Ident #171717
Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ...
   ***  Error on Record 340759 (on 440531 -> 77 % in File)  ***  Ident #171717
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ...
   ***  Error on Record 340760 (on 440531 -> 77 % in File)  ***  Ident #171717
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ...
   ***  Error on Record 341398 (on 440531 -> 77 % in File)  ***  Ident #172039
Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ...
   ***  Error on Record 341400 (on 440531 -> 77 % in File)  ***  Ident #172039
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ...
   ***  Error on Record 341401 (on 440531 -> 77 % in File)  ***  Ident #172039
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ...
   ***  Error on Record 348024 (on 440531 -> 79 % in File)  ***  Ident #174944
Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ...
   ***  Error on Record 348026 (on 440531 -> 79 % in File)  ***  Ident #174944
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ...
   ***  Error on Record 348027 (on 440531 -> 79 % in File)  ***  Ident #174944
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ...
   ***  Error on Record 349696 (on 440531 -> 79 % in File)  ***  Ident #175652
Complex Type incorrect : RATIONAL_B_SPLINE_CURVE / BOUNDED_CURVE ...
   ***  Error on Record 349698 (on 440531 -> 79 % in File)  ***  Ident #175652
Complex Type incorrect : REPRESENTATION_ITEM / GEOMETRIC_REPRESENTATION_ITEM ...
   ***  Error on Record 349699 (on 440531 -> 79 % in File)  ***  Ident #175652
Complex Type incorrect : GEOMETRIC_REPRESENTATION_ITEM / CURVE ...
Info    : Healing geometry (tolerance=1e-06)
Info    : - fixing small edges
Info    : removing degenerated edge 0
...
...
Info    : removing degenerated edge 0
Info    : - fixing wire gaps
Info    : some 2D gaps fixed
Info    : some 3D gaps fixed
Info    : failed to fix some 2D gaps
Info    : failed to fix some 3D gaps
Info    : - fixing spot and strip faces
Error   : Something wrong in edge loop
Error   : Something wrong in edge loop
...
...
Error   : Something wrong in edge loop
Info    : OCC Region 1 - New Shell
Info    : OCC Region 1 with 2001 faces
Info    : Read 'newfile.stp'
Info    : Meshing 1D...
Info    : Meshing curve 1 (BSpline)
...
...
...
Info    : Meshing curve 603 (BSpline)

Info    : Meshing curve 604 (Unknown)

Info    : Meshing curve 605 (BSpline)

Info    : Meshing curve 725 (Unknown)

Info    : Meshing curve 741 (Unknown)

Info    : Meshing curve 760 (Unknown)
Info    : Meshing surface 100 (BSpline surface, MeshAdapt)
Info    : Meshing surface 101 (Unknown, MeshAdapt)
Info    : Meshing surface 102 (Unknown, MeshAdapt)
Info    : Meshing surface 103 (Unknown, MeshAdapt)
Info    : Meshing surface 104 (BSpline surface, MeshAdapt)
Warning : :-( There are 6 intersections in the 1D mesh (curves 501 448 495 502 447 454)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-( There are 2 intersections in the 1D mesh (curves 447 454)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-) Gmsh was able to recover all edges after 2 iterations
Info    : Meshing surface 105 (Plane, MeshAdapt)

Info    : Meshing surface 210 (BSpline surface, MeshAdapt)
Warning : :-( There are 3 intersections in the 1D mesh (curves 890 892 894)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-( There are 3 intersections in the 1D mesh (curves 890 894 892)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-( There are 3 intersections in the 1D mesh (curves 890 892 894)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-( There are 2 intersections in the 1D mesh (curves 892 890)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-) Gmsh was able to recover all edges after 4 iterations
Info    : Meshing surface 211 (BSpline surface, MeshAdapt)

Info    : Meshing surface 274 (Plane, MeshAdapt)
Warning : :-( There are 6 intersections in the 1D mesh (curves 1195 1195 1196 1196 1181 1182)
Warning : 8-| Gmsh splits those edges and tries again
Info    : Meshing surface 275 (BSpline surface, MeshAdapt)

Info    : Meshing surface 336 (BSpline surface, MeshAdapt)
Warning : :-( There are 3 intersections in the 1D mesh (curves 1428 1429 1438)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-( There are 3 intersections in the 1D mesh (curves 1429 1429 1437)
Warning : 8-| Gmsh splits those edges and tries again
Warning : :-) Gmsh was able to recover all edges after 2 iterations
Info    : Meshing surface 337 (BSpline surface, MeshAdapt)

Info    : Meshing surface 348 (Plane, MeshAdapt)
Warning : :-( There are 5 intersections in the 1D mesh (curves 1213 1216 1216 1479 1479)
Warning : 8-| Gmsh splits those edges and tries again
Info    : Meshing surface 349 (BSpline surface, MeshAdapt)


Dave




On 18/12/09 09:52, stefano zinna wrote:
> Dear David.
>
> Thank you for the fast reply. I made a routine to avoid double lines so
> i think this isn't the problem.
> I have the original step file
> (https://download.yousendit.com/Z01PSkhYcVhuSlIzZUE9PQ). Can you explain
> which steps are better to generate the mesh?
>
> kind regards,
> Stefano
>
> David Colignon wrote:
>>
>> On 17/12/09 18:36, stefano zinna wrote:
>>> Dear Sirs.
>>>
>>> I converted a .stl file into .geo
>>> (https://download.yousendit.com/Z01NSU5OOW5samQzZUE9PQ) for gmsh.
>>
>> Hi Stefano,
>>
>> very nice geometry !
>>
>> Are you *sure* that each line shared by two triangles is only defined
>> once ? (it seems to be the case...)
>>
>> I'm
>>> able to generate the surface mesh but it is not able to recognize the
>>> volume. Is it a problem in the file or it depends on the complexity of
>>> the geometry?
>>
>>
>> When you try to create the volume with the GUI and you click on a
>> first surface, you can see that almost all the surfaces are then
>> selected and change color to red. But the GUI keep asking to select
>> volume boundary to fully close the volume. Due to the complexity of
>> the geometry, it is very difficult to detect with the eye by zooming
>> on every part of the geometry if some surfaces are missing, so I
>> cannot see there is a real problem in the geometry or if some surfaces
>> are left unselected...
>>
>> Converting your CAD file to the STL format and then converting it to
>> .geo is not the best solution. Do you have access to the original CAD
>> file ? Can you try to export it to the STEP format instead ?
>>
>> Regards,
>>
>> Dave
>>
>