Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting the following error while creating a 3D mesh what is the reason? #4

Open
zhichaoluan opened this issue Aug 3, 2023 · 2 comments
Assignees

Comments

@zhichaoluan
Copy link

zhichaoluan commented Aug 3, 2023

import pygimli as pg
import pygimli.meshtools as mt
from pygimli.physics import ert
from pygimli.viewer import pv

data = pg.getExampleData("ert/gallery3d.dat")
data["k"] = ert.geometricFactors(data, dim=3)
print(data)

plc = mt.createParaMeshPLC3D(data, paraDepth=12, paraMaxCellSize=1,
                             surfaceMeshQuality=34)
print(plc)
mesh = mt.createMesh(plc, quality=1.3)
print(mesh)

I am getting the following error while creating a 3D mesh what is the reason?

C:\Users\asus\.conda\envs\pg\python.exe E:/pyGIMLi/beijing96/3d1.py
03/08/23 - 16:05:42 - pyGIMLi - Data: Sensors: 126 data: 753, nonzero entries: ['a', 'b', 'k', 'm', 'n', 'rhoa', 'valid']
INFO - Looking for ert/gallery3d.dat in gimli-org/example-data/
Mesh: Nodes: 596 Cells: 0 Boundaries: 1157
'tetgen' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
Traceback (most recent call last):
  File "E:\pyGIMLi\beijing96\3d1.py", line 13, in <module>
    mesh = mt.createMesh(plc, quality=1.3)
  File "C:\Users\asus\.conda\envs\pg\lib\site-packages\pygimli\meshtools\mesh.py", line 148, in createMesh
    mesh = pg.meshtools.syscallTetgen(namePLC, quality, area,
  File "C:\Users\asus\.conda\envs\pg\lib\site-packages\pygimli\meshtools\polytools.py", line 1893, in syscallTetgen
    mesh = pg.meshtools.readTetgen(filebody + '-1')
  File "C:\Users\asus\.conda\envs\pg\lib\site-packages\pygimli\meshtools\mesh.py", line 963, in readTetgen
    with open(fName + '.node', 'r') as node_in:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\asus\\AppData\\Local\\Temp\\tmp3sc6apj4-1.node'
@halbmy halbmy self-assigned this Aug 7, 2023
@halbmy
Copy link
Contributor

halbmy commented Aug 7, 2023

Seems like tetgen is not working properly, please check whether it is installed.

Please provide (as mentioned in the issue template) information on how you installed pyGIMLi and the version number.

@halbmy
Copy link
Contributor

halbmy commented Aug 7, 2023

Without knowing your version, I guess you could be using pyGIMLi v1.4.0 where we missed to specify tetgen as dependency for the conda package (see also gimli-org/gimli#526). In this case, install tetgen (conda install tetgen) and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants