pyvista / pyiges

Python IGES Reader
https://pyvista.github.io/pyiges/
MIT License
33 stars 8 forks source link

Issue / Question #5

Closed AdamWiddow closed 3 years ago

AdamWiddow commented 3 years ago

Hi, I'm fairly new to Coding so this might be something fairly simple.

I've copied the code into Python (Python 3.7 in Pycharm with Pyiges 0.1.4 package installed) and tried to run it.

The error I get is:

**'' "D:\adamwiddowson\Documents\Python Stuff\venv\Scripts\python.exe" "D:/adamwiddowson/Documents/Python Stuff/IGES to STL/IGES to STL.py" Traceback (most recent call last): File "D:/adamwiddowson/Documents/Python Stuff/IGES to STL/IGES to STL.py", line 8, in print(iges[0]) File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyiges\iges.py", line 357, in getitem return self._entities[self._pointers[index]] KeyError: 0

Process finished with exit code 1 ''**

If I remove line 8, which is ''print(iges[0])'' the error changes to:

**'' Converting entities to vtk: 100%|██████████| 4615/4615 [00:02<00:00, 1985.23it/s] Windows fatal exception: code 0xc0000374

Thread 0x000045e0 (most recent call first): File "C:\Program Files\Python37\lib\threading.py", line 300 in wait File "C:\Program Files\Python37\lib\threading.py", line 552 in wait File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\tqdm_monitor.py", line 60 in run File "C:\Program Files\Python37\lib\threading.py", line 926 in _bootstrap_inner File "C:\Program Files\Python37\lib\threading.py", line 890 in _bootstrap

Current thread 0x00003d7c (most recent call first): File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyvista\plotting\renderer.py", line 1312 in reset_camera File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyvista\plotting\renderer.py", line 381 in add_actor File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyvista\plotting\plotting.py", line 539 in add_actor File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyvista\plotting\plotting.py", line 1867 in add_mesh File "D:\adamwiddowson\Documents\Python Stuff\venv\lib\site-packages\pyvista\plotting\helpers.py", line 117 in plot File "D:/adamwiddowson/Documents/Python Stuff/IGES to STL/IGES to STL.py", line 12 in ''**

I've checked the IGES file and it opens in my software fine.

Thanks

Adam

akaszynski commented 3 years ago

Looks like there's a bug with my code. If you have a chance, can you upload the iges file here so I can figure out the bug?

AdamWiddow commented 3 years ago

Looks like there's a bug with my code. If you have a chance, can you upload the iges file here so I can figure out the bug?

It should just be the 'impeller' example which is imported from pygies in line 2. The code i'm running is:

'' image

''

I've uploaded the file anyway onto the link below: [https://drive.google.com/drive/folders/1jmicd8Ek14UHqeG1hN05ubG3DsVD9Hpb?usp=sharing]

akaszynski commented 3 years ago

Found the bug, and this will be patched in pyiges==0.1.5. Look for the next release on PyPi in an hour or less.