Python GMSH APi gmsh.model.occ.setMeshSize doesn't work
Following code should mesh with step = 50 however the mesh with step = 200 is generated.
gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1)
file_name = "rectangle"
gmsh.model.add(file_name)
p0 = gmsh.model.occ.addPoint(-800, -800, 0, meshSize=200)
p1 = gmsh.model.occ.addPoint(800, -800, 0, meshSize=200)
p2 = gmsh.model.occ.addPoint(800, 800, 0, meshSize=200)
p3 = gmsh.model.occ.addPoint(-800, 800, 0, meshSize=200)
point_tags = [p0, p1, p2, p3]
lines = [gmsh.model.occ.addLine(point_tags[i - 1], point_tags[i]) for i in range(4)]
cl = gmsh.model.occ.addCurveLoop(lines)
rec1 = gmsh.model.occ.addPlaneSurface([cl])
gmsh.model.occ.synchronize()
p_dimtags = [(0, tag) for tag in point_tags]
gmsh.model.occ.setMeshSize(p_dimtags, 50)
gmsh.model.occ.synchronize()
gmsh.option.setNumber("Mesh.CharacteristicLengthFromPoints", 1)
gmsh.option.setNumber("Mesh.CharacteristicLengthExtendFromBoundary", 1)
gmsh.option.setNumber("Mesh.CharacteristicLengthMin", 50)
gmsh.option.setNumber("Mesh.CharacteristicLengthMax", 200)
gmsh.model.mesh.generate(2)
gmsh.fltk.run()
gmsh.finalize()