<div dir="ltr">Thank you very much!<div><br></div><div>I was indeed missing the "Coherence Mesh".</div><div>It works great with it, with my real application too!<div><br></div><div>Elisa</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 23 set 2019 alle ore 17:03 Christophe Geuzaine <<a href="mailto:cgeuzaine@uliege.be">cgeuzaine@uliege.be</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 23 Sep 2019, at 15:23, Elisa Schenone <<a href="mailto:elisa.schenone@moxoff.com" target="_blank">elisa.schenone@moxoff.com</a>> wrote:<br>
> <br>
> You were indeed correct. The 1D meshes should be fixed now.<br>
> <br>
> I send you the correct geo file which is a bit closer to the real application (instead of the ring described in object.stl I will have a more complicated geometry).<br>
> The three mesh files have been tested with the -check gmsh command and seem to be correct.<br>
> <br>
> During the 3D mesh generation I still get the error:<br>
> Error   : Invalid boundary mesh (segment-facet intersection) on surface 1, intersection (0.327411,-5.98225,4.06924e-11)<br>
> <br>
<br>
The STL mesh in object.stl is defined by coordinates: there is no topological link between the triangulation and the discrete curve meshes that you provide in the circleLine{1,2}.mesh files. You should either provide the mesh with the full topology; or force Gmsh to merge all geometrically identical nodes by adding<br>
<br>
Coherence Mesh;<br>
<br>
after you merge object.stl. It's slower (it involves geometrical lookups) but it works well on your test case :<br>
<br>
<br>
<br>
<br>
<br>
<br>
Christophe<br>
<br>
<br>
> Thanks again for your help,<br>
> Elisa<br>
> <br>
> <br>
> Il giorno ven 20 set 2019 alle ore 17:50 Christophe Geuzaine <<a href="mailto:cgeuzaine@uliege.be" target="_blank">cgeuzaine@uliege.be</a>> ha scritto:<br>
> <br>
> <br>
> > On 20 Sep 2019, at 09:20, Elisa Schenone <<a href="mailto:elisa.schenone@moxoff.com" target="_blank">elisa.schenone@moxoff.com</a>> wrote:<br>
> > <br>
> > Thank you for your quick answer.<br>
> > <br>
> > I'm sorry I missed "BottomBox" surface in the surface loop. Adding it does not fix the problem.<br>
> > I cannot see why the volume should not be correctly defined since I use the same 1D entities to define adjacent surfaces.<br>
> > <br>
> <br>
> The 1D mesh in circleLine2.mesh does not seem to be correct: <br>
> <br>
> Info    : Running 'gmsh circleLine2.mesh -check' [Gmsh 4.5.0-git-52cd4c1bd, 1 node, max. 1 thread]<br>
> Info    : Started on Fri Sep 20 17:47:42 2019<br>
> Info    : Reading 'circleLine2.mesh'...<br>
> Info    : 240 nodes<br>
> Info    : 240 edges<br>
> Info    : Done reading 'circleLine2.mesh'<br>
> Info    : Checking mesh coherence (240 elements)...<br>
> Info    : Checking for duplicate nodes...<br>
> Warning : Vertex 22 (-5, -2.09068991909e-14, 0) already exists in the mesh with tolerance 1.41421e-07: Vertex 21 (-5, -1.98869004218e-14, 0)<br>
> Warning : Vertex 82 (-6.12322976306e-16, -5, 0) already exists in the mesh with tolerance 1.41421e-07: Vertex 81 (-1.72085002921e-15, -5, 0)<br>
> Warning : Vertex 83 (4.99599990504e-16, -5, 0) already exists in the mesh with tolerance 1.41421e-07: Vertex 81 (-1.72085002921e-15, -5, 0)<br>
> Warning : Vertex 143 (5, 2.39252994044e-14, 0) already exists in the mesh with tolerance 1.41421e-07: Vertex 142 (5, 2.29676998584e-14, 0)<br>
> Error   : 4 duplicate nodes: see `duplicate_node.pos'<br>
> <br>
> Let's fix that first and see how to proceed from there?<br>
> <br>
> Christophe<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> > Actually, the real application is more complicated than the simplified example I sent you. Instead of the circle surface I have a quite complicated geometry coming from a stp from which I extracted the boundary (the 1D mesh I merge in my geo file). Also, I cannot use OpenCascade since I need some attractor fields and a boundary layer in my real application.<br>
> > <br>
> > Maybe there is a better way to treat stp file? I need to extract "manually" its boundary because I'd like to write in my geo something like:<br>
> > bnd[] = Boundary{Surface{14};};<br>
> > but I don't know a priori the label of the surface I want to extract the boundary of.<br>
> > <br>
> > Even assuming I know the label from which to extract the 1D boundary, I still have this kind of error:<br>
> > Error   : Invalid boundary mesh (segment-facet intersection) on surface 121, intersection (50,15,5.57227e-11)<br>
> > I attach a screenshot too.<br>
> > I tried to change the sign of surface 93 (which is innermost circle), the intersection error moves few elements on the right but is the same.<br>
> > <br>
> > Could it be because of normals?<br>
> > <br>
> > Thank you,<br>
> > Elisa<br>
> > <br>
> > Il giorno gio 19 set 2019 alle ore 19:59 Christophe Geuzaine <<a href="mailto:cgeuzaine@uliege.be" target="_blank">cgeuzaine@uliege.be</a>> ha scritto:<br>
> > <br>
> > <br>
> > > On 19 Sep 2019, at 11:28, Elisa Schenone <<a href="mailto:elisa.schenone@moxoff.com" target="_blank">elisa.schenone@moxoff.com</a>> wrote:<br>
> > > <br>
> > > Dear gmsh developers,<br>
> > > <br>
> > > I'm trying to use gmsh to create a cube mesh with a surface separated in multiple entities: two concentric circles are inscribed into the top surface (square).<br>
> > > The external circle comes from a 1D mesh that I merge to my geo script.<br>
> > > The internal circle has been created only as a workaround since gmsh could not create the 2D mesh inside the 1D line (file circleLine1.mesh or circleLine2.mesh).<br>
> > > <br>
> > > Small changes in the script, i.e. characteristic length, line1 or line2, small circle dimensions, etc., give different errors but none of these combinations seems to work.<br>
> > > <br>
> > > Also, in case the 2D mesh is correctly generated, the surface mesh quality is very bad in some points and the 3D mesh cannot be generated. I tried various options for the 2D and 3D mesh algorithms but none of them gives good results.<br>
> > > <br>
> > > What am I doing wrong?<br>
> > > <br>
> > <br>
> > The volume does not seem to be defined correctly. In all cases the surface mesh looks fine to me...<br>
> > <br>
> > Why don't you define all the curves as CAD entities?<br>
> > <br>
> > Christophe<br>
> > <br>
> > > I send you a minimal example of my geo script and the 1D mesh I use to define the inscribed circle.<br>
> > > <br>
> > > Thank you in advance,<br>
> > > bests,<br>
> > > Elisa<br>
> > > <br>
> > > <br>
> > > <circleLine2.mesh><testGmsh.geo><circleLine1.mesh>_______________________________________________<br>
> > > gmsh mailing list<br>
> > > <a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
> > > <a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
> > <br>
> > — <br>
> > Prof. Christophe Geuzaine<br>
> > University of Liege, Electrical Engineering and Computer Science <br>
> > <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
> > <br>
> > <br>
> > <br>
> > <br>
> > <br>
> > <br>
> >      <br>
> > <ScreenshotGmsh.png><ScreenshotGmsh2.png>_______________________________________________<br>
> > gmsh mailing list<br>
> > <a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
> > <a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
> <br>
> — <br>
> Prof. Christophe Geuzaine<br>
> University of Liege, Electrical Engineering and Computer Science <br>
> <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <ScreenshotGmsh3.png><testGmsh.geo><circleLine2.mesh><object.stl><circleLine1.mesh><br>
<br>
— <br>
Prof. Christophe Geuzaine<br>
University of Liege, Electrical Engineering and Computer Science <br>
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="color:rgb(153,153,153)">Elisa Schenone, Ph. D.</span><br></div><div><font color="#999999">Math Model Developer</font><br><div><font face="verdana, sans-serif"><font color="#999999"><span>mobile +39 </span>3489213843</font></font></div><div><span style="color:rgb(153,153,153);font-size:13px">Moxoff SpA - </span><span style="color:rgb(153,153,153);font-size:13px">Spinoff del Politecnico di Milano </span></div><div style="color:rgb(136,136,136);font-size:12.8px;border-collapse:collapse"><br></div><div><a href="https://www.moxoff.com/" style="color:rgb(17,85,204);font-size:12.8px" target="_blank"><img src="https://docs.google.com/uc?export=download&id=12c6h_I7Q_ClEfJVbMM5EzCZjMAAriGFy&revid=0B0LAgDyAsWqWYkdRZW9XRWpBME5qbi9PbWVNd2haMm5kRm9jPQ"></a><span style="color:rgb(136,136,136);font-size:12.8px"> </span><a href="https://it.linkedin.com/company/moxoff-srl" style="color:rgb(17,85,204);font-size:12.8px" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1BU9yj7oGPuU6pBkwo102d681bmZh9w4e&revid=0B0LAgDyAsWqWRzVCVHNxS095Ri9HODBwUEFQckJMbXZCYUxJPQ"></a><span style="color:rgb(136,136,136);font-size:12.8px"> </span><a href="https://www.facebook.com/mathematicsforinnovation" style="color:rgb(17,85,204);font-size:12.8px" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1GMQ5YV9C9bN7KBTz1yGyTsTcjI-dYja2&revid=0B0LAgDyAsWqWUEp5WXY4SDBRZEM4dzN4VE5wam5KS1laa1FnPQ"></a><span style="color:rgb(136,136,136);font-size:12.8px"> </span><a href="https://twitter.com/moxoff_mathxinn" style="color:rgb(17,85,204);font-size:12.8px" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1HgcjR5-wn4BKbu-9bc4mhAwDZG1MUjwO&revid=0B0LAgDyAsWqWNXI3QTUvUExWdktLSVFDTkQ0NWhjTTRWK1I0PQ"></a><span style="color:rgb(136,136,136);font-size:12.8px"> </span><a href="https://www.youtube.com/channel/UCYhhMLkNQ4zAvSW8_juK-2Q" style="color:rgb(17,85,204);font-size:12.8px" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1cH-319DbXt7rEM9fXLiWgPgayq9IDSws&revid=0B0LAgDyAsWqWUFdGWCtWQndONXJ3NXZYQTJIRjJyL3hiNE1rPQ"></a> <br></div></div></div></div></div></div></div></div></div></div>