@cedric Please try the latest build while you are at it.
I made an Altium file that crashes the importer. In altium 20, I’ve removed 2 tracks. Link to the file:
https://www.mediafire.com/file/kkdjos4gj1n3bmk/IceZUM_Core_HX1K.PcbDoc/file
Steps taken:
1 Run C:\Users\cedric\Downloads\kicad-patched-634-5.99.0-1222-gbef8587d3-x86_64\bin\pcbnew.exe (I’ve used 7zip to extract the downloaded exe)
2 Choose File-import non-KiCAD board file
3 Navigate to the correct folder, set the filetype to *.pcbdoc and open IceZUM_Core_HX1K.PcbDoc
4 See the error “An unhandled exception occured. Press “Abort” to terminate the program, Retry to exit the program normally and “Ignore to try to continue”
5 Press retry. Now pcbnew closes.
My versions:
Application: Pcbnew
Version: (5.99.0-1222-gbef8587d3), release build
Libraries:
wxWidgets 3.0.4
libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Build date: Mar 25 2020 14:34:47
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.66.0
Compiler: GCC 9.2.0 with C++ ABI 1013
Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON
I managed to improve the Importer quite a bit in the last days:
- Copper Regions are finally correctly detected
- No more artifacts on hatched zones
- Fix crash due to layer handling issues
- Better error reporting and more checks
- Dimensions are now supported also in Circuit Studio import
- Code cleanup and style fixes
Hi there,
Is there anything I can do that makes it easier to start working on the schematic importer?
Cheers,
Cedric
My current plan for now is to get the first part merged. I will add at least one follow-up PR on the PCB importer to fix bugs and add improvements.
For schematic importer, I will wait at least until the new schematic file format is integrated and enabled in the nighties. I suspect some parts of the surrounding code will change due to new semantics.
Because Altium schematics are text based, and there is a reverse-engineered documentation available, I suspect this work will be rather straight-forward. In comparison to a PCB, it’s easier to get a correct schematic. (No clearances, zones, …)
at this repo there are test files which contain many different shapes, together with screenshot how they look like in Altium
altium2kicad sample file #1
altium2kicad sample file #2
I think my importer is quite good now. I didn’t knew about rectangular holes, but the other two problems (rotated slot and rounded polygon edge) were already known to me.
Does it help if I export some PCB’s with Altium and with Kicad and compare the output in the Kicad gerber viewer?
Yes, this will certainly help. I think most stuff should be exact the same, except:
-
text - Different font, sometimes alignment is wrong
-
dimensions - If present they should look at least similar
-
polygons / regions - No trackwidth used for outer polygon line (thus they should be a bit smaller after importing, only some design rules are imported -> wrong/none thermal connection).
In case of Polygon inside Keepout, it will not be filled (No idea how Altium handles this, look onto LimeSDR board for reference).
Regions/Fills are always graphic polygons at the moment -> missing net when region is in fact a copper zone connected to a net
FYI, this has now been merged on master and should be available on the the next or the build after the next’s nightly on all platforms.
It looks like it’s not yet in the latest Windows nightly build as of right now (2020-04-04T07:45:00Z). It may be a bit difficult to find anyways - if I’m correct after looking at the code, the only visible change is new file extensions in pcbnew’s File -> Import Non-KiCad Board File dialog’s file extension drop-down list, and only when pcbnew is in standalone mode.
@pointhi can tell if I’m right.
Yes, for now only standalone board import is implemented. Altium Project import will be added when schematic import is supported as well.
A short screencast isn’t very meaningful for this feature, but I’ll show one just because this is an important feature which deserves publicity
2020-04-05_11-40-22
I’m late to the effort but I’m an Altium user so I can help test if needed. I’ve got KiCad loaded on both an iMac and Windows 10 machine. I’m running the latest Altium release, 20.0.13
I’m not pointhi, but I still can say that you could convert your Altium designs to KiCad on both platforms and see if you can find any bugs or glaring omissions. Then report them to the official issue database. Because the feature is now part of public nightly builds, the issue database is better than informal forum messages. Please always follow the issue template. If possible, attach example Altium projects.
OK, thanks. I’m working with the “Medtronics OpenVentilator Conversion Team” currently but once we finish our work I’ll have more time to try and help
Updates:
There are now some blog articles about this work:
- https://hackaday.com/2020/04/14/altium-has-its-2kicad-moment/
- https://www.cnx-software.com/2020/04/05/how-to-build-kicad-on-ubuntu-18-04-and-import-altium-pcb-files/#importing-altium-pcb-layout-in-kicad
- https://blog.oshpark.com/2020/04/05/altium-board-importer-for-kicad/
Two MR with bugfixes and improvements:
-
https://gitlab.com/kicad/code/kicad/-/merge_requests/147
- fix coverty issues, improve code style
- support more altium layers which are stored as string
-
https://gitlab.com/kicad/code/kicad/-/merge_requests/151
- improve code
- fix crasher bug due to coding error
- add support for new string replacements (New string replacement options for kicad assets)
The most annoying bugs I need to fix next, are for now:
- some weired pads in some boards, which should be not on non-copper?!?? Please give in your experience if you know how Altium does this
- improve zone handling in planes as well as fills in keepouts
Hi pointhi
I just tested your newest MR https://gitlab.com/kicad/code/kicad/-/merge_requests/164
with my Altium File on Linux and found some Errors:
-
I imported a PCB with a Text on Top_Layer which consist of two lines, this CR/LF, LF is not converted, therefore a “?” is displayed. After editing the text (deleting line break, adding a new one) the “?” is gone
-
an other problem is the position of the Strings, it seems like the origin of the Strings on the top_overlay is different in altium and kicad