(WORKAROUND) DXF import problem 0.21?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

(WORKAROUND) DXF import problem 0.21?

Post by thomas-neemann »

I can no longer import any dxf files in the current 0.21 appimage. Can anybody confirm this?
Unnamed-Cube.dxf
(6.59 KiB) Downloaded 28 times

Code: Select all

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33321 (Git) AppImage
Build type: Release
Branch: master
Hash: 1d61ed187c9633702818c6cc5d7a1f07dd052ca8
Python 3.10.11, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * BIM 2021.12.0
  * Curves 0.6.9

edit

Code: Select all

08:40:50  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/.mount_33321-XCl3ss/usr/Mod/Draft/importDXF.py", line 2773, in insert
    Import.readDXF(filename)
Last edited by thomas-neemann on Wed May 31, 2023 9:37 am, edited 1 time in total.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: DXF import problem 0.21?

Post by easyw-fc »

hi,
it seems an issue also in win release, but without error messages.
Note: legacy importer works fine
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: DXF import problem 0.21?

Post by thomas-neemann »

easyw-fc wrote: Wed May 31, 2023 9:31 am ...
Note: legacy importer works fine
thanks for the info, here under linux too
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: (WORKAROUND) DXF import problem 0.21?

Post by Syres »

The last good working build I have is

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33012 (Git)
Build type: Release
Branch: master
Hash: 8f3e7451dde780ab7ac64f0eda22c9def5850889
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Silk 0.1.3
  * A2plus
  * Defeaturing 1.2.0
  * CurvedShapes 1.0.4
  * MakerWorkbench 1.0.1
  * freecad.gears 1.0.0
  * Curves 0.6.8
  * toSketch 1.0.1
  * Plot 2022.4.17
  * AirPlaneDesign 0.4.0
  * fasteners 0.4.56
  * sheetmetal 0.2.63
The full error with current master I get is:

Code: Select all

LookupError: unknown encoding: ANSI_1252

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

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/john/freecad-daily-build/Mod/Draft/importDXF.py", line 2773, in insert
    Import.readDXF(filename)
SystemError: <built-in method readDXF of tuple object at 0x7fa910c06840> returned a result with an error set
So I'll see if I can track down the commit.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: (WORKAROUND) DXF import problem 0.21?

Post by adrianinsaval »

please create an issue on github
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: (WORKAROUND) DXF import problem 0.21?

Post by Syres »

Firstly there's already an Issue but it wasn't tested with FreeCAD's own DXF files which is alarming to say the least https://github.com/FreeCAD/FreeCAD/issues/8704 and can be re-opened as not fixed.

The PR responsible is https://github.com/FreeCAD/FreeCAD/pull/9060/files

The root cause from my testing is https://github.com/FreeCAD/FreeCAD/blob ... 3345-L3347 condition should be case insensitive as there can be ANSI and ansi based on the fact that some are imported OK but most (all my test files) that I found aren't imported.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: (WORKAROUND) DXF import problem 0.21?

Post by Syres »

Submitted https://github.com/FreeCAD/FreeCAD/pull/9712 but still have reservations that there are DXF files out there that open in 0.20.x but don't open in 0.21 after this change. I've hooked up an old HDD and will find some more to test.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: (WORKAROUND) DXF import problem 0.21?

Post by thomas-neemann »

Syres wrote: Fri Jun 02, 2023 10:47 am
thank you very much
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: (WORKAROUND) DXF import problem 0.21?

Post by easyw-fc »

Syres wrote: Fri Jun 02, 2023 10:47 am Submitted https://github.com/FreeCAD/FreeCAD/pull/9712 but still have reservations that there are DXF files out there that open in 0.20.x but don't open in 0.21 after this change. I've hooked up an old HDD and will find some more to test.
any news on this PR?
it seems a quite big issue on basic features...
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: (WORKAROUND) DXF import problem 0.21?

Post by Syres »

easyw-fc wrote: Mon Jun 05, 2023 2:12 pm any news on this PR?
it seems a quite big issue on basic features...
@yorik as you merged the previous PR for the issue, could you please review https://github.com/FreeCAD/FreeCAD/pull/9712 it's quite an important fix, TIA.
Post Reply