specifying number of nodes on edge
Hello, I have seen some options in the full documentation ([http://gmsh.info//doc/texinfo/gmsh.html#Specifying-mesh-element-sizes]) but I don't find how to address the following case:
I am importing two shapes in stp format. They share a common border (a straight one in the current case). What I aim for is to specify the same refinement at this border for each of the shapes. See picture.
I am able to do this empirically by setting "MeshSizeFactor" to 0.19 for the 1st shape and to 0.1 for the second one. See code below. These numbers might probably fit the other aspects of the shape geometries in the other directions. The problem is each time the shape geometry definition change then each time the MeshSizeFactor has to be reset.
My question is: how to specify a constant number of nodes for this common edge ?
Here is the python code:
`if gmsh:
gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1)
# load the STEP file
gmsh.merge('../geometry/shape1.stp')
# set 2D unstructured algorithm to 'Automatic'(2) or 'Frontal-Delaunay'(6)
gmsh.option.setNumber("Mesh.Algorithm", 2)
gmsh.option.setNumber("Mesh.MeshSizeFactor", 0.19)
# mesh generation: (2)surface (3)volume
gmsh.model.mesh.generate(2)
gmsh.write("shape1.msh")
gmsh.write("shape1.stl")
gmsh.model.occ.remove(gmsh.model.getEntities(2))
gmsh.merge('../geometry/shape2.stp')
gmsh.option.setNumber("Mesh.Algorithm", 2)
gmsh.option.setNumber("Mesh.MeshSizeFactor", 0.1)
gmsh.model.mesh.generate(2)
gmsh.write("shape2.msh")
gmsh.write("shape2.stl")
gmsh.model.occ.remove(gmsh.model.getEntities(2))
gmsh.finalize()`