Kilted
October 10, 2023, 7:59am
1
Hi All,
New here after coming across from EAGLE so I’m still finding my way about KiCAD but happy with what I’ve done so far. I have designed a board and exporting it to FreeCAD using StepUp. The Board and the Tracks come across without issue but I can’t seem to get the Silkscreens working. I have used the CheatSheet and I am exporting them as DXF in KiCAD but StepUp is throwing a few errors.
Any help to resolve this would be greatly appreciated.
Would @maui be the person to ask?
Thank you
08:36:09 There has been an error:
08:36:09 Unable to identify DXF file version
08:36:09 Running the Python command 'ksuToolsAddSilks' failed:
Traceback (most recent call last):
File "C:\Users\*******\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\.\kicadStepUpCMD.py", line 4232, in Activated
makefacedxf.makeFaceDXF()
File "C:\Users\********\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\.\makefacedxf.py", line 184, in makeFaceDXF
File "C:\Program Files\FreeCAD 0.21\Mod\Draft\importDXF.py", line 2766, in insert
processdxf(doc, filename)
File "C:\Program Files\FreeCAD 0.21\Mod\Draft\importDXF.py", line 2136, in processdxf
drawing = dxfReader.readDXF(filename)
File "C:\Users\*******\AppData\Roaming\FreeCAD\Macro\dxfReader.py", line 399, in readDXF
(infile, drawing) = sm.run((infile, None))
cannot unpack non-iterable bool object
Application: KiCad PCB Editor x64 on x64
Version: 7.0.1, release build
Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.21.1.33668 +26 (Git)
Build type: Release
Branch: (HEAD detached at 0.21.1)
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods:
* kicadStepUpMod 10.19.5
maui
October 10, 2023, 8:53am
2
hi,
it should be an issue in the FC dxf legacy library…
there is a discussion at FC forum and gh
opened 10:04AM - 05 Sep 23 UTC
closed 06:06AM - 10 Oct 23 UTC
Bug
File format: DXF
Regression
### Is there an existing issue for this?
- [X] I have searched the existing i… ssues
### Problem description
The V1.41 DXF importer library breaks when trying to import or open a DXF file when the file doesn't contain the information about the AutoCAD drawing database version number `$ACADVER`.
As far as I understand the DXF reference information from [AutoDesk](https://documentation.help/AutoCAD-DXF/WS1a9193826455f5ff18cb41610ec0a2e719-7a6f.htm), it isn't a mandatory information
Among others it breaks the import function of [KiCadStepUpMod by easyw](https://github.com/easyw/kicadStepUpMod/issues/181). Trying to load a PCB silkscreen in DXF format yields the error `cannot unpack non-iterable bool object`
In [my comment in KiCadStepUp](https://github.com/easyw/kicadStepUpMod/issues/181#issuecomment-1706299022) I have a rather ugly workaround for the time beeing.
### Full version info
```shell
[code]
OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.21.0.33668 +7 (Git)
Build type: Release
Branch: (HEAD detached at 0.21)
Hash: 41b058e2087de60dc8fef3d3e68c7d0129e13abf
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:
* Assembly3 0.12.0
* fasteners 0.4.59
* InventorLoader 1.4.0
* kicadStepUpMod 10.19.4
* Manipulator 1.5.0
* sheetmetal 0.2.63
[/code]
```
### Subproject(s) affected?
Other (specify in description)
### Anything else?
```
17:48:04 opening /home/pde/Downloads/test/test-F_Silkscreen.dxf...
17:48:04 There has been an error:
17:48:04 Unable to identify DXF file version
17:48:04 Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/.mount_FreeCAXl4oNg/usr/Mod/Draft/importDXF.py", line 2766, in insert
processdxf(doc, filename)
File "/tmp/.mount_FreeCAXl4oNg/usr/Mod/Draft/importDXF.py", line 2136, in processdxf
drawing = dxfReader.readDXF(filename)
File "/home/pde/.local/share/FreeCAD/Macro/dxfReader.py", line 399, in readDXF
(infile, drawing) = sm.run((infile, None))
<class 'TypeError'>: cannot unpack non-iterable bool object
```
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
opened 11:06AM - 25 Jun 23 UTC
closed 07:17AM - 05 Jul 23 UTC
Bug
File format: DXF
Missing: example file
Missing: steps to reproduce
### Is there an existing issue for this?
- [X] I have searched the existing i… ssues
### Version
0.20 (Release)
### Full version info
```shell
[code]
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods:
* Assembly4
* kicadStepUpMod 10.10.4
[/code]
```
### Subproject(s) affected?
None
### Problem description
When trying to import DXF using the legacy Python importer only generates an error:
```
13:00:03 DXF libraries need to be updated. Trying to download...
13:00:03 downloading https://raw.githubusercontent.com/yorikvanhavre/Draft-dxf-importer/1.40/dxfColorMap.py ...
13:00:03 downloading https://raw.githubusercontent.com/yorikvanhavre/Draft-dxf-importer/1.40/dxfImportObjects.py ...
13:00:03 downloading https://raw.githubusercontent.com/yorikvanhavre/Draft-dxf-importer/1.40/dxfLibrary.py ...
13:00:03 downloading https://raw.githubusercontent.com/yorikvanhavre/Draft-dxf-importer/1.40/dxfReader.py ...
13:00:03 Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Program Files\FreeCAD 0.20\Mod\Draft\importDXF.py", line 2827, in insert
getDXFlibs()
File "D:\Program Files\FreeCAD 0.20\Mod\Draft\importDXF.py", line 202, in getDXFlibs
import dxfColorMap, dxfLibrary, dxfReader
File "D:\Program Files\FreeCAD 0.20\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
<class 'SyntaxError'>: invalid syntax (dxfReader.py, line 88)
```
### Anything else?
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
it should be solved … you could try to enable updating legacy DXF library in FC preferences
EDIT: could you share the dxf file? (even PM me if you prefer)
Kilted
October 10, 2023, 9:38am
3
Hi @maui thanks for getting back to me.
The checkbox for enabling the DXF library update is already checked in FC preferences.
Can you send me a message and I’ll forward you the files please?
maui
October 10, 2023, 1:16pm
4
ok, I’ve got the files…
it seems there still an issue in FC legacy importer
we need to reopen the issue
1 Like
Kilted
October 10, 2023, 3:24pm
5
Thanks Maui.
Are you reopening the issue? Sorry, I’m not sure how bug reporting is done.
maui
October 10, 2023, 6:14pm
6
It seems FC support for legacy dxf importer is moving slowly…
I’ve added an old stable lib to kSU.
Try to update the wb, to see if everything is solved.
1 Like
Kilted
October 11, 2023, 8:22am
7
Thanks @maui , I have it working now. Thanks for all your help.
system
Closed
January 9, 2024, 8:23am
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.