solved Can't Open Any dxf Files

KryBaby

Aktiver Benutzer
Member
Country flag
I can't open any dxf files. (Even sample dxf from source code files.) The app tries to process the files yet never draws a figure.

Installed with apt-get install dxf2gcode. Tried unsuccessfully to do command line install with GitHub - ltspicer/dxf2gcode.linux.installer: Installer script for Linux users (Debian based -- Debian, Ubuntu, Linux Mint, etc.). Tested on Linux Mint MATE, Debian GNOME & Lubuntu (LXDE)

kubuntu 20.04.4 LTS
Python 3.8.10

The following warnings are shown when run from the command line

desktop:~$ dxf2gcode
Creating configuration window
Creating configuration window
File: /home/hps/Downloads/dxf2gcode/1997_simplified_doppelte_linien.dxf selected
Loading file: /home/hps/Downloads/dxf2gcode/1997_simplified_doppelte_linien.dxf
Reading DXF Structure
Creating Contours of Entities
Loaded layers: 1
Loaded blocks: 0
Loaded 908 entity geometries; reduced to 12 contours; used layers: [0]; number of inserts 0
Drawing units: millimeters
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dxf2gcode/core/shape.py", line 609, in abs_iter
raise StopIteration()
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/bin/dxf2gcode", line 727, in open
self.load()
File "/usr/bin/dxf2gcode", line 874, in load
self.makeShapes()
File "/usr/bin/dxf2gcode", line 922, in makeShapes
self.makeEntityShapes(self.entityRoot)
File "/usr/bin/dxf2gcode", line 996, in makeEntityShapes
tmp_shape.AnalyseAndOptimize()
File "/usr/lib/python3/dist-packages/dxf2gcode/core/shape.py", line 175, in AnalyseAndOptimize
self.setNearestStPoint(Point())
File "/usr/lib/python3/dist-packages/dxf2gcode/core/shape.py", line 190, in setNearestStPoint
min_geo_nr, _ = min(enumerate(self.geos.abs_iter()),
RuntimeError: generator raised StopIteration
 

spicer

Absoluter Profi
Staff member
Administrator
Moderator
Country flag
Welcome here to the board.
Why unsuccessfully with dxf2gcode.linux.installer?
With apt install dxf2gcode you install not the current version!
Can you post the the file 1997_simplified_doppelte_linien.dxf and the log from dxf2gcode.linux.installer please?
You can just run the installer again.
I think the problem is here:
Code:
Please, Log in or Register to view codes content!
 
Last edited:

KryBaby

Aktiver Benutzer
Member
Country flag
Thank you very much!

I reinstalled using "dxf2gcode.linux.installer" and it seemed to go well. I received "dxf2gcode was successfully installed" in red. The log is lengthy, not informative, and available here if you wish to read it: https://drive.google.com/file/d/1YFuotSFv1_z1c4w-abRPzf7h1uITVYlv/view?usp=sharing

link to the dxf file: dxf2gcode / SourceCode / [e6eddf] /dxf/1997_simplified_doppelte_linien.dxf

Steps:
1. downloaded from GitHub - ltspicer/dxf2gcode.linux.installer: Installer script for Linux users (Debian based -- Debian, Ubuntu, Linux Mint, etc.). Tested on Linux Mint MATE, Debian GNOME & Lubuntu (LXDE) to /home/user_name/Downloads/DXF2gcode/
2. chmod of linux.installer.sh to executable
3. downloaded code from https://sourceforge.net/projects/dxf2gcode/files/latest/download
4. extracted the code
5. entered path to dxf2gcode -- home/username/Downloads/DXF2gcode/source
6. received "dxf2gcode was successfully installed" in red
7. received the following warning after running "dxf2gcode" from the command line.
"/usr/local/lib/python3.8/dist-packages/dxf2gcode-2022_02_26-py3.8.egg/dxf2gcode/core/pocketmove.py:84: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?
/usr/local/lib/python3.8/dist-packages/dxf2gcode-2022_02_26-py3.8.egg/dxf2gcode/core/pocketmove.py:84: SyntaxWarning: 'str' object is not callable; perhaps you missed a comma?"
8. also received "The configuration file version (9.10) doesn't match the software expected (9.11). You have to delete (or carefully edit) the configuration file "/home/username/.config/dxf2gcode/config/config.cfg" to solve the problem" message pop-up box.
9. removed the "config.cfg" file.
10. ran "dxf2gcode" from cmdline
11. received pop-up to remove /.config/dxf2gcode/postpro_config/postpro_config.cfg
12. removed the file
13. ran "dxf2gcode"
14. SUCCESSFULLY OPENED "1997_simplified_doppelte_linien.dxf" HOOT!

Thank you for the prompt response!

I believe the difficulties of the previous install might be related to a typographical error in when the script request a path to the source code. I then ran the script in sudo and this probably confused the script interpretation of the correct path to install files. Or maybe the apt-get left some legacy files even though dxf2gcode was uninstalled.
 

spicer

Absoluter Profi
Staff member
Administrator
Moderator
Country flag
Because you ran the script with sudo, some libraries were made root-only.
 
Last edited:

KryBaby

Aktiver Benutzer
Member
Country flag
I think it is, but have not really tested the latest install yet.

Can I change the status to solved?

I think I saw somewhere a link to where I can donate/contribute to dxf2gcode project. Is there a link?
 

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

Who Read This Thread (Total Members: 3)

Top