0

I need a way to analyze the mesh data that I receive from Gmsh. Currently, I am able to successfully generate a 3D quad-mesh of a given STEP file. However, the plugin "AnalyseMeshQuality" does not seem to work for me. At first, I simply tried putting the following code after my quad remeshing script:

gmsh.plugin.setNumber("AnalyseMeshQuality", "JacobianDeterminant", 1)
gmsh.plugin.setNumber("AnalyseMeshQuality", "DimensionOfElements", 2)
t = gmsh.plugin.run("AnalyseMeshQuality")
dataType, tags, data, time, numComp = gmsh.view.getModelData(t, 0)

But the traceback threw the error:

OSError                                   Traceback (most recent call last)
Cell In[18], line 3
      1 gmsh.plugin.setNumber("AnalyseMeshQuality", "JacobianDeterminant", 1)
      2 gmsh.plugin.setNumber("AnalyseMeshQuality", "DimensionOfElements", 2)
----> 3 t = gmsh.plugin.run("AnalyseMeshQuality")
      4 dataType, tags, data, time, numComp = gmsh.view.getModelData(t, 0)

File ~\.conda\envs\gmsh\lib\site-packages\gmsh.py:9706, in plugin.run(name)
   9695 """
   9696 gmsh.plugin.run(name)
   9697 
   (...)
   9703 - `name': string
   9704 """
   9705 ierr = c_int()
-> 9706 api_result_ = lib.gmshPluginRun(
   9707     c_char_p(name.encode()),
   9708     byref(ierr))
   9709 if ierr.value != 0:
   9710     raise Exception(logger.getLastError())

OSError: exception: access violation reading 0x0000000300000019

So, I tried the exact example code found on the gitlab.onelab repository:

https://gitlab.onelab.info/gmsh/gmsh/blob/master/examples/api/mesh_quality.py

However, it threw exactly the same error. I am wondering if there is an issue in Gmsh or if something has changed from a previous version of Gmsh. I'm using gmsh version 4.11.1 and python version 3.10.9 .

0 Answers0