[Gmsh] Fwd: Re: 3D meshing from stl surface fails

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Aug 3 22:58:44 CEST 2010


Hi Alexander & Dave - I've improved the VRML code so that we can import 
several datasets into the same model. Both algorithms work qute nicely 
on the resulting model (see attached picts).

On 03/08/10 15:44, David Colignon wrote:
> -------- Original Message --------
> Subject: Re: [Gmsh] 3D meshing from stl surface fails
> Date: Fri, 23 Jul 2010 11:05:44 +0200
> From: Alexander Opitz <alexander.opitz at tuebingen.mpg.de>
> To: David Colignon <David.Colignon at ulg.ac.be>
>
> Hi Davw
>
> Thanks for your answer. I hadn't tetgen included. Then the meshing was
> succesful like you reported. Unfortunately the mesh quality is too bad
> for my purposes (see attached screenshot) and optimizing failed. So I
> think I will need the Frontal algorithm for my mesh. This didn't work
> with the .stl file. Surprisingly it worked when I converted my .stl file
> to a .wrl file and the frontal meshing was successful with good mesh
> quality.
> What I need is to combine two surfaces and build up a model of the brain
> with volume meshes inside the first surface and between both surfaces.
> Meshing was successful with Frontal Algorithm for both single surfaces
> alone but I could not combine them. Here I got the error: Unknown
> surface 2. I think that my .geo file is correct and the surfaces don't
> intersect.
>
> My .geo file is:
>
> Merge "wm_final.fc3.120k.u4.wrl";
> Merge "gm_final.fc3.120k.u5.wrl";
>
> Surface Loop( 6) = {1};
> Surface Loop( 7) = {2};
>
> Volume(11) = {6};
> Volume(12) = {6, 7};
>
> Physical Surface(16) = {1};
> Physical Surface(17) = {2};
>
> Physical Volume(21) = {11};
> Physical Volume(22) = {12};
>
>
> Kind regards,
> Alex
>
> On Thu, 22 Jul 2010 15:48:30 +0200
> David Colignon <David.Colignon at ulg.ac.be> wrote:
>> Hi Alex,
>>
>> on my Mac Pro, with the stable version 2.4.2 of Gmsh, it works
>> flawlessly (with the default 2D MeshAdapt and 3D Delaunay meshing
>> algorithms)
>>
>> ace35:~/Desktop > more gm_final.fc3.120k.u4.geo
>>
>> Merge "gm_final.fc3.120k.u4.stl" ;
>> Surface Loop(2) = {1};
>> Volume(3) = {2};
>>
>> ace35:~/Desktop > gmsh gm_final.fc3.120k.u4.geo -3
>>
>> Info : Running '/Applications/Gmsh.app/Contents/Resources/bin/gmsh
>> gm_final.fc3.120k.u4.geo -3'
>> Info : Started on Thu Jul 22 15:28:00 2010
>> Info : Reading 'gm_final.fc3.120k.u4.geo'
>> Info : Reading 'gm_final.fc3.120k.u4.stl'
>> Info : 306318 facets in solid 0
>> Info : Read 'gm_final.fc3.120k.u4.stl'
>> Info : Read 'gm_final.fc3.120k.u4.geo'
>> Info : Meshing 1D...
>> Info : Mesh 1D complete (4e-06 s)
>> Info : Meshing 2D...
>> Info : Mesh 2D complete (3.4e-05 s)
>> Info : Meshing 3D...
>> Info : Meshing volume 3 (Delaunay)
>> Constructing Delaunay tetrahedralization.
>> Warning: Point 152574 is identical with point 110939.
>> Warning: Point 112634 is identical with point 152366.
>> Delaunay seconds: 14.7105
>> Creating surface mesh.
>> Perturbing vertices.
>> Delaunizing segments.
>> Constraining facets.
>> Segment and facet seconds: 10.7547
>> Removing unwanted tetrahedra.
>> Hole seconds: 0.927735
>> Repairing mesh.
>> Repair seconds: 0.186837
>> Jettisoning redundants points.
>>
>> Writing nodes.
>> Writing elements.
>> Writing faces.
>> Writing edges.
>>
>> Output seconds: 0.263875
>> Total running seconds: 26.8662
>>
>> Statistics:
>>
>> Input points: 153159
>> Input facets: 306318
>> Input segments: 459477
>> Input holes: 0
>> Input regions: 0
>>
>> Mesh points: 168535
>> Mesh tetrahedra: 590449
>> Mesh triangles: 1349435
>> Mesh subfaces: 337074
>> Mesh subsegments: 474855
>>
>> Info : 168535 points 474855 edges and 337074 faces in the final mesh
>> Info : 168535 points created -- Worst tet radius is 7.61408e+17
>> Info : 168536 points created -- Worst tet radius is 122.177
>> Info : 168536 points created -- Worst tet radius is 59.185
>> Info : 168536 points created -- Worst tet radius is 39.0332
>> Info : 168539 points created -- Worst tet radius is 29.3443
>> Info : 168549 points created -- Worst tet radius is 23.626
>> Info : 168556 points created -- Worst tet radius is 19.7953
>> Info : 168566 points created -- Worst tet radius is 17.1471
>> Info : 168576 points created -- Worst tet radius is 15.1799
>> Info : 168598 points created -- Worst tet radius is 13.6863
>> Info : 168623 points created -- Worst tet radius is 12.5285
>> Info : 168653 points created -- Worst tet radius is 11.5356
>> Info : 168685 points created -- Worst tet radius is 10.7441
>> Info : 168741 points created -- Worst tet radius is 10.0556
>> Info : 168806 points created -- Worst tet radius is 9.49178
>> Info : 168873 points created -- Worst tet radius is 8.97708
>> Info : 168946 points created -- Worst tet radius is 8.54247
>> Info : 169037 points created -- Worst tet radius is 8.17892
>> Info : 169139 points created -- Worst tet radius is 7.84477
>> Info : 169262 points created -- Worst tet radius is 7.55351
>> Info : 169391 points created -- Worst tet radius is 7.28692
>> Info : 169526 points created -- Worst tet radius is 8.24615
>> Info : 169654 points created -- Worst tet radius is 6.81515
>> Info : 169809 points created -- Worst tet radius is 6.77303
>> ...
>> ...
>> ...
>> Info : 700661 points created -- Worst tet radius is 1.01298
>> Info : 702627 points created -- Worst tet radius is 1.01172
>> Info : 704535 points created -- Worst tet radius is 1.01052
>> Info : 706502 points created -- Worst tet radius is 1.20045
>> Info : 708425 points created -- Worst tet radius is 1.121
>> Info : 710457 points created -- Worst tet radius is 1.00688
>> Info : 712398 points created -- Worst tet radius is 1.24997
>> Info : 714343 points created -- Worst tet radius is 1.19153
>> Info : 716172 points created -- Worst tet radius is 1.0034
>> Info : 718064 points created -- Worst tet radius is 1.00229
>> Info : 720023 points created -- Worst tet radius is 1.00108
>> Info : Mesh 3D complete (162.896 s)
>> Info : 709218 vertices 4357077 elements
>> Info : Writing 'gm_final.fc3.120k.u4.msh'
>> Info : Wrote 'gm_final.fc3.120k.u4.msh'
>> Info : Stopped on Thu Jul 22 15:31:02 2010
>>
>> Regards,
>>
>> Dave
>>
>>
>>
>> On 22/07/10 13:21, Alexander Opitz wrote:
>> > Hi Dave
>> > Sorry I sent you a mesh with some intersecting triangles. Attached
>> is the corrected one which still didn't mesh.
>> >
>> > Kind regards,
>> > Alex
>> >
>> >
>> > On Thu, 22 Jul 2010 12:07:19 +0200
>> > David Colignon<David.Colignon at ulg.ac.be> wrote:
>> >> Hi Alexander,
>> >>
>> >> at this stage, there is nothing we can do to help you without a
>> copy of your .stl file ...
>> >>
>> >> Regards,
>> >>
>> >> Dave
>> >>
>> >> --
>> >> David Colignon, Ph.D.
>> >> Collaborateur Logistique du F.R.S.-FNRS
>> >> CÉCI - Consortium des Équipements de Calcul Intensif
>> >> ACE - Applied& Computational Electromagnetics
>> >> Sart-Tilman B28
>> >> Université de Liège
>> >> 4000 Liège - BELGIQUE
>> >> Tél: +32 (0)4 366 37 32
>> >> Fax: +32 (0)4 366 29 10
>> >> WWW: http://hpc.montefiore.ulg.ac.be/
>> >> Agenda:
>> http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
>> >>
>> >>
>> >> On 22/07/10 12:01, Alexander Opitz wrote:
>> >>> Hi
>> >>>
>> >>> First many thanks for this great tool!
>> >>> But now I am stuck with the following problem. I want to create a
>> 3D volume mesh from an imported stl surface. The surface doesn't
>> self-intersect but the meshing was not successful. I tried different
>> meshing algorithms but none did succeed. Now my question is what the
>> failure in my stl surface could be that ceases gmsh from successful
>> meshing.
>> >>>
>> >>> I got the following error messages:
>> >>>
>> >>> Info : Started on Thu Jul 22 11:56:36 2010
>> >>>
>> >>> Info : Reading 'Test.geo'
>> >>>
>> >>> Info : Reading 'gm_final.fc3.120k.u2.stl'
>> >>>
>> >>> Info : 308300 facets in solid 0
>> >>>
>> >>> Info : Read 'gm_final.fc3.120k.u2.stl'
>> >>>
>> >>> Info : Read 'Test.geo'
>> >>>
>> >>> Info : Meshing 1D...
>> >>>
>> >>> Info : Mesh 1D complete (0 s)
>> >>>
>> >>> Info : Meshing 2D...
>> >>>
>> >>> Info : Mesh 2D complete (0 s)
>> >>>
>> >>> Info : Meshing 3D...
>> >>>
>> >>> Info : Meshing volume 3 (Frontal)
>> >>>
>> >>> Info : Region 3 Face 1, 2 intersect
>> >>>
>> >>> Info : CalcLocalH: 154150 Points 0 Elements 308300 Surface Elements
>> >>>
>> >>> Info : Check subdomain 1 / 1
>> >>>
>> >>> Info : 308300 open elements
>> >>>
>> >>> Error : ERROR: Edge 18830 - 35775 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 35775 - 41184 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 39024 - 39025 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 39025 - 39103 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 39024 - 41967 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 39103 - 41967 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 43936 - 44298 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 43936 - 46685 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 44298 - 91790 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 46685 - 91790 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 18830 - 153860 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Edge 41184 - 153860 multiple times in surface mesh
>> >>>
>> >>> Error : ERROR: Surface mesh not consistent
>> >>>
>> >>> Error : ERROR: Stop meshing since surface mesh not consistent
>> >>>
>> >>> Info : Mesh 3D complete (6.11 s)
>> >>>
>> >>> Info : 154150 vertices 308300 elements
>> >>>
>> >>>
>> >>> I am running Gmsh Version 2.4.2 on 64 bit Linux Ubuntu.
>> >>>
>> >>> Any help is appreciated.
>> >>>
>> >>> Many thanks!
>> >>>
>> >>> Alex
>> >>>
>> >>> _______________________________________________
>> >>> gmsh mailing list
>> >>> gmsh at geuz.org
>> >>> http://www.geuz.org/mailman/listinfo/gmsh
>> >>
>> >
>>
>
>


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brain2.png
Type: image/png
Size: 311186 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100803/3588f8c5/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brain.png
Type: image/png
Size: 308321 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100803/3588f8c5/attachment-0001.png>