Mirror and arrange the mesh, not the geometry
Hello,
I would like to know if there is a build-in solution to copy, mirror and possibly transform meshes (without geometry).
To make the situation a bit easier to understand I have prepared a simplified geometry example. Here I have a "pizza piece" of a component. This piece can be assembled into a complete part by mirroring it once followed by rounding it several times.
Suppose I have put a lot of work into meshing this part (which of course is not the case for this simple example) and do not want to repeat this work multiple times (this piece is only 1/16th of the part, but it could of course be arranged much more often, up to the order of >100). Is there a way to "detach" the mesh from the geometry and mirror and arrange the mesh?
Here's what I tried (for the time being, I'm only concerned with the mirroring process, the arrangement will then be somehow equivalent to it.):
import gmsh
gmsh.initialize()
gmsh.merge("symmetric_model.step")
orig = gmsh.model.getEntities(dim=3)
copy = gmsh.model.occ.copy(orig)
gmsh.model.occ.mirror(copy, 0,0,1,0)
gmsh.model.occ.fuse(orig, copy)
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(3)
gmsh.fltk.run()
gmsh.finalize()
and get this result
This works, somehow, but I have a problem with the result: The geometry was mirrored and meshed, but the mesh is not symmetrical. For my later evaluation I would have to have symmetric elements and nodes (so e.g. Node.X=-Node.X, Node.Y=Node.Y, Node.Z=Node.Z for a mesh mirrored about the Y-Z plane).