Get empty outDimTags when using importShapesNativePointer on Windows, but works correctly on Mac
Hello everyone, first of all, my best respect to all your great work on gmsh!
My first question here, I'll try my best to make it clear.
I'm developing a tiny python gui software based on PythonOCC (7.6.2) and gmsh (4.10.5), and working on both Mac OS and Windows. I need to mesh an shape obtained by PythonOCC, and I use importShapesNativePointer to pass the pointer of the object to gmsh. Everything works fine on Mac OS.
However, when I switched to run the same code on Windows, I could only get empty outDimTags when using importShapesNativePointer. Got very confused. Tried everything I can to find out the reason, but failed.
By simplying my problem to the following example code. I can get [(1, 1)]
on Mac, but still []
on Windows. Could you please help me to deal with it?
from OCC.Core import BRepBuilderAPI
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge
from OCC.Core.gp import gp_Pnt
import gmsh
a = gp_Pnt(1,1,1)
b = gp_Pnt(100, 100, 100)
c = BRepBuilderAPI_MakeEdge(a,b).Shape()
gmsh.initialize()
d = gmsh.model.occ.importShapesNativePointer(int(c.this))
print(d)
gmsh.finalize()