<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Dear List,</div><div><br></div><div>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><br></div><div>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><br></div><div><div>import gmsh</div><div><br></div><div>gmsh.initialize()</div><div>gmsh.option.setNumber("General.Terminal", 1)</div><div>gmsh.model.add("MyTest")</div><div>lc = 1e-4</div><div>gmsh.model.geo.addPoint(0, 0, 0, lc, 1)</div><div>gmsh.model.geo.addPoint(.1, 0,  0, lc, 2)</div><div>gmsh.model.geo.addPoint(.1, .3, 0, lc, 3)</div><div>gmsh.model.geo.addPoint(0, .3, 0, lc, 4)</div><div>gmsh.model.geo.addLine(1, 2, 1)</div><div>gmsh.model.geo.addLine(3, 2, 2)</div><div>gmsh.model.geo.addLine(3, 4, 3)</div><div>gmsh.model.geo.addLine(4, 1, 4)</div><div>gmsh.model.geo.addCurveLoop([4, 1, -2, 3], 1)</div><div>gmsh.model.geo.addPlaneSurface([1], 1)</div><div>gmsh.model.addPhysicalGroup(2, [1], 1)</div><div>gmsh.model.setPhysicalName(2, 1, "My surface")</div><div>gmsh.model.geo.synchronize()</div><div>gmsh.model.mesh.generate(2)</div><div>gmsh.write("MyTest.msh")</div><div>gmsh.finalize()</div></div><div><br></div><div>Thanks,</div><div>Alejandro</div><div><br></div><div><br></div></body></html>