<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>It works fine over here: are you sure you are editing/examining the correct input/output files?<div class=""><br class=""></div><div class="">Add</div><div class=""><br class=""></div><div class=""> gmsh.fltk.run()</div><div class=""><br class=""></div><div class="">before gmsh.finalize() - it will launch the GUI so that you can inspect the model interactively.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 20 May 2018, at 21:03, Alejandro Pina <<a href="mailto:ajpina@gmail.com" class="">ajpina@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class=""><div class="">Dear List,</div><div class=""><br class=""></div><div class="">I have been trying to use the Python API but my meshing does not respond to the mesh size that I set when adding the points. I reproduced my problem in the following example. So no matter what value I set on ‘lc’, the surface always happens to have only four triangles.</div><div class=""><br class=""></div><div class="">Hope you can help me figure it out and be able to control the meshing. I am also attaching the resulting 'MyTest.msh’ file. </div><div class=""><br class=""></div><div class=""><div class="">import gmsh</div><div class=""><br class=""></div><div class="">gmsh.initialize()</div><div class="">gmsh.option.setNumber("General.Terminal", 1)</div><div class="">gmsh.model.add("MyTest")</div><div class="">lc = 1e-4</div><div class="">gmsh.model.geo.addPoint(0, 0, 0, lc, 1)</div><div class="">gmsh.model.geo.addPoint(.1, 0, 0, lc, 2)</div><div class="">gmsh.model.geo.addPoint(.1, .3, 0, lc, 3)</div><div class="">gmsh.model.geo.addPoint(0, .3, 0, lc, 4)</div><div class="">gmsh.model.geo.addLine(1, 2, 1)</div><div class="">gmsh.model.geo.addLine(3, 2, 2)</div><div class="">gmsh.model.geo.addLine(3, 4, 3)</div><div class="">gmsh.model.geo.addLine(4, 1, 4)</div><div class="">gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1)</div><div class="">gmsh.model.geo.addPlaneSurface([1], 1)</div><div class="">gmsh.model.addPhysicalGroup(2, [1], 1)</div><div class="">gmsh.model.setPhysicalName(2, 1, "My surface")</div><div class="">gmsh.model.geo.synchronize()</div><div class="">gmsh.model.mesh.generate(2)</div><div class="">gmsh.write("MyTest.msh")</div><div class="">gmsh.finalize()</div></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Alejandro</div><div class=""><br class=""></div><div class=""><br class=""></div></div>
<span id="cid:9025B45E-9736-4A2E-844D-8A1022026F57@home"><MyTest.msh></span>_______________________________________________<br class="">gmsh mailing list<br class=""><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">http://onelab.info/mailman/listinfo/gmsh<br class=""></div></blockquote></div><br class=""></div></body></html>