[Gmsh] Meshing composite volumes

Martin Vymazal martin.vymazal at vki.ac.be
Fri May 3 11:40:42 CEST 2013


Hello Theodore,

 I attached a geo file and a screenshot. If you're using linux, run as 
 gmsh -3 remesh.geo output.msh

I suppose this is not exactly what you wanted (the interior volume is not completely 
removed), and the problem most likely comes from the fact that the interior surface does not 
form a watertight mesh (has holes). Since the interior volume can 'communicate' with the 
surrounding volume through the holes, the mesh generator fills everything. The only option I 
see is making sure that the interior surface is really closed.

Best regards,

   Martin Vymazal 


On Thursday 02 May 2013 12:41:18 Ted Kord wrote:


Hi Martin



Sorry for the late reply. I've attached the two surface meshes: polygon.stl and ellipsoid.stl. So, 
what I wanted to do was have a polygon mesh with the ellipsoid removed. Ideally, of course, I 
just would need to know the common surface shared by both the polygon and the ellipsoid in 
a 3D mesh.



Could I ask that you please not share these meshes or post them on the forum as they are 
subject to some restrictions/copyright, etc. Of course, so that me and the gmsh community 
can learn, posting and sharing the geo file is a good thing. 



Many thanks,



Theodore





On 30 April 2013 22:03, Martin Vymazal <martin.vymazal at vki.ac.be[1]> wrote:


Hello Theodore,
 
could you send me the stl files? If I manage to produce the mesh, I'll send the geo file to you.
 
Best regards, 
 
Martin Vymazal
 
 
On Tuesday 30 of April 2013 17:18:33 Ted Kord wrote:


Hi Martin,



Thanks. Is this what you mean?


Merge "polygon.stl";Merge "ellipsoid.stl";

CreateTopology;

Physical Surface (1) = {1};Physical Surface (2) = {2};





I'm not sure what to do after this to remove the ellipsoid from the polygon?



Best regards,



Theodore





On 30 April 2013 15:18, Martin Vymazal <_martin.vymazal at vki.ac.be_> wrote:


Hi Theodore,
 
you need to tell gmsh that the surface contains a hole. Define two line loops - one for the 
contour of the external polygon (say Line Loop 1) and one for the contour of the ellipse (say 
Line Loop 2). Then you define your surface for meshing as 
 
Plane Surface(1) = {1,2}; // Subtract the interior of line loop 2 
// from the interior of line loop 1
 
See section 5.1.3 in gmsh reference manual or tutorial 3 on gmsh website. 
 
If you don't have any lines to create line loops from (since you're loading an stl file), take a 
look at 'CreateTopology'. 
 
Best regards, 
 
Martin Vymazal
 
On Tuesday 30 April 2013 12:32:34 Ted Kord wrote:


Hi,



I have an STL mesh consisting of an irregular ellipsoid in an irregular polygon. When I turn off 
'surface faces' in the 'Options - Mesh', I can see the ellipsoid in the polygon. What I'd like to do 
is mesh just the containing polygon excluding the ellipsoid, i.e., the final mesh will have a hole 
where the ellipsoid should be. How can I do this in gmsh?






Theodore





gmsh at geuz.org[2]
http://www.geuz.org/mailman/listinfo/gmsh[3]





Theodore





gmsh at geuz.org[2]
http://www.geuz.org/mailman/listinfo/gmsh[3]


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130503/f4ff3792/attachment.html>
-------------- next part --------------
Merge "torso_ventricles.stl";

Mesh.CharacteristicLengthMin = 20.0;
Mesh.CharacteristicLengthMax = 60.0;

//This creates 2 surfaces numbered 1 and 2:
CreateTopology;

Surface Loop(1) = {1};
Surface Loop(2) = {2};

Volume(1) = {1,2};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mesh.jpg
Type: image/jpeg
Size: 1938118 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130503/f4ff3792/attachment.jpg>