I am using gmsh to build a geometry.
This geometry is composed by several simple subdomains (for example boxes), so I was thinking on defining each of them separately and then use the boolean operation
However, it seems that it is only allowed to fuse two geometries (and not three or more). For example, if we consider the following minimal example (fusing three simple boxes):
# Initialise meshing process import gmsh gmsh.initialize() # Subdomains box1 = gmsh.model.occ.addBox(-1.5, -0.5, 0, 1, 1, 1) box2 = gmsh.model.occ.addBox(-0.5, -0.5, 0, 1, 1, 1) box3 = gmsh.model.occ.addBox(0.5, -0.5, 0, 1, 1, 1) # Fuse subdomains into a single domain gmsh.model.occ.fuse([(3,box1)], [(3,box2)], [(3,box3)])
I get an error in the last line.
Is there an alternative way of performing this operation? I know that a solution would be to define each surface of the final domain, but fusing geometries would be much simpler for my real geometry.
Many thanks in advance.