GXSURFACEITEM

I am getting this error with GXSURFACEITEM.add_mesh. It does not fit with the documentation.

C:\Users\Marc\Anaconda3\python.exe C:/Users/Marc/Documents/TetraGeophysics/Logiciels/aeminv/aeminv/aeminv.py
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Marc\Anaconda3\lib\tkinter\__init__.py", line 1699, in __call__
return self.func(*args)
File "C:/Users/Marc/Documents/TetraGeophysics/Logiciels/aeminv/aeminv/aeminv.py", line 279, in exportgxsurface
plate.add_mesh(surfaceitem)
File "C:\Users\Marc\Documents\TetraGeophysics\Logiciels\aeminv\aeminv\plate.py", line 308, in add_mesh
surfaceitem.add_mesh(xvv,yvv,zvv,f1vv,f2vv,f3vv)
File "C:\Users\Marc\Anaconda3\lib\site-packages\geosoft\gxapi\GXSURFACEITEM.py", line 332, in add_mesh
ret_val = self._add_mesh(vert_v_vx, vert_v_vy, vert_v_vz, tri_vv_pt1, tri_vv_pt2, tri_vv_pt3)
TypeError: Argument 'vert_v_vx' has incorrect type (expected gxapi_cy.WrapVV, got GXvv)

Comments

  • IanMacLeod
    edited June 2018
    @MarcAVallee Assuming all your vv are GXvv instances, it should be:

    surfaceitem.add_mesh(xvv.gxvv, yvv.gxvv, zvv.gxvv, f1vv.gxvv, f2vv.gxvv, f3vv.gxvv)
  • IanMacLeod
    edited June 2018
    @MarcAVallee you might also consider working with the geometry.Mesh class, which wraps much of gxapi.SURFACEITEM and allows you to work at the gxpy module level, which in general creates cleaner code.

    Edit: Correction, sorry, I meant the Surface class, which works with meshes stored in the Mesh class.
  • Thank you. I will have a look.

    Marc
This discussion has been closed.