Exception: Unknown OpenCASCADE entity of dimension 2 with tag 6
import gmsh
from math import *
r1 = 1 # Radius of inner iron cylinder
r2 = 1.2 # Radius of outer iron cylinder
gmsh.initialize()
gmsh.option.setNumber("Mesh.SaveAll", 1)
gmsh.option.setNumber("Mesh.Algorithm", 6)
gmsh.model.add("concretereinforcedpipe")
lc = 10e-3
concrete_radius = gmsh.model.occ.addCircle(0, 0, 0, r1, 1)
gmsh.model.occ.synchronize()
concrete_curveloop = gmsh.model.occ.addCurveLoop([concrete_radius],2)
gmsh.model.occ.synchronize()
concrete_surface = gmsh.model.occ.addPlaneSurface([concrete_curveloop],3)
gmsh.model.occ.synchronize()
iron_radius = gmsh.model.occ.addCircle(0, 0, 0, r1,4)
gmsh.model.occ.synchronize()
iron_curveloop = gmsh.model.occ.addCurveLoop([concrete_radius],5)
gmsh.model.occ.synchronize()
iron_surface = gmsh.model.occ.addPlaneSurface([concrete_curveloop],6)
gmsh.model.occ.synchronize()
print(gmsh.model.occ.getEntities())
frag1 = gmsh.model.occ.fragment([(2,3)],[(2,6)], tag=8)
frag1 = gmsh.model.occ.fragment([(2,6)],[(2,3)], tag=9)
gmsh.model.occ.synchronize()
gmsh.model.occ.extrude([(2,7)],0,0,100.0)
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(3)
gmsh.write("concrete_pipe.msh")
gmsh.finalize()
prusso@yoga:~/symfem-demo$ cd /home/prusso/symfem-demo ; /usr/bin/env /bin/python3 /home/prusso/.vscode/extensions/ms-python.python-2023.16.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 36367 -- /home/prusso/symfem-demo/gmsh_create_pipe.py
[(0, 1), (0, 2), (1, 1), (1, 4), (2, 3), (2, 6)]
Error : Unknown OpenCASCADE entity of dimension 2 with tag 6
Traceback (most recent call last):
File "/home/prusso/symfem-demo/gmsh_create_pipe.py", line 31, in <module>
frag1 = gmsh.model.occ.fragment([(2,6)],[(2,3)], tag=9)
File "/home/prusso/.local/lib/python3.10/site-packages/gmsh.py", line 8100, in fragment
raise Exception(logger.getLastError())
Exception: Unknown OpenCASCADE entity of dimension 2 with tag 6
for ubuntu jammy...