Hi guys,
I try to merge 2 mesh in a unique mesh
# Import libraries
from dolfin import *
from mshr import *
# Meshs
mesh_1 = BoxMesh(Point(0.0, 0.0, 0.0), Point(1.0, 1.0, 1.0),1,1,1)
mesh_2 = BoxMesh(Point(1.0, 1.0, 1.0), Point(2.0, 0.0, 0.0),1,1,1)
Then, I would like something like.
mesh_total = mesh_1 + mesh_2
plot(mesh_total , title='Total mesh', interactive=True)
I do no work on complex geometries, only with cube connected by at least a face.
I have try the following methods, unsuccessfully :
mesh_tot = mesh_1 + mesh_2
mesh_tot = generate_mesh (mesh_tot, 32)
Or
mesh_tot = MultiMesh()
mesh_tot.add(mesh_1)
mesh_tot.add(mesh_2)
mesh_tot.build()
I have seen the function CSGUnion but i dont understand how it works
I know I can use the MeshEditor, but i would like really to avoid this method ( i have thousands of cell to merge... so if i can avoid the connectiviy calculations, that would be great).