Some of you might have already noticed this but for those that haven’t, I thought I’d post in the forum to highlight some work I’ve been doing on the KiCad codebase: a native Zuken CADSTAR importer for KiCad.
My motivation for doing so is that in my company we have been looking to change EDA tools (since CADSTAR is really quite dated and clunky to use). The main hurdle with switching design tools is that most of the designs in my company have been done in CADSTAR so the new tool would need to be able to import our existing designs. I spent time looking at Altium, since their literature claims they are able to convert CADSTAR designs, however this proved to not be quite true. To summarise: I spent 18 months back and forth with the Altium representative trying different versions of Altium to find a significant number of import errors that required a lot of manual rework. They fixed some of the errors but left the most time consuming ones with the excuse that the CADSTAR importer is a low priority development for them since not many users request it. The current state of the Altium importer meant we had to spend 2-3 hours of manual effort after the automatic import, which was not acceptable (given we have hundreds of designs).
So that left me in a difficult position: basically I was stuck with using CADSTAR forever (nightmare!). I really like KiCad and used it several times for personal projects with the latest version being in many ways superior to CADSTAR. I came to the conclusion to move away from CADSTAR at work I would have to spend my free time developing an importer for KiCad
I have spent the last two months working on this and have now finalised a CADSTAR PCB Archive importer (see https://gitlab.com/kicad/code/kicad/-/merge_requests/279 ). This is waiting for code review before the code gets merged in to master. In parallel to this am working offline on a schematic importer which I hope to also finish before v6 feature freeze (this will be a stretch but luckily most of the elements in the schematic file format are exact copies of those in the PCB, so half the work is done).
I think the PCB importer works reasonably well but it does need more extensive testing and it is very possible that it will fail with some designs. However I have tried it with several complex designs from my company (with 6 layers and FPGAs) and in all of them the import was excellent.
Unfortunately I can’t share designs boards from my company, but just to give you an idea, I imported below a design from the CADSTAR “self teach” tutorial (Chapter_11_-2019.0-_rev21.cpa|attachment (169.3 KB) ).
I exported this design to a “.cpa” file inside CADSTAR (File -> Export…) and imported into KiCad using the CADSTAR importer in pcbnew (File -> Import -> Non-KiCad Board File -> CADSTAR PCB Archive Files). The result is below:
Yes - just to clarify: this is not yet a feature of KiCad and not available in the nightlies either. If you want to test it, unfortunately, it requires compiling the code in the merge request from source.
@Qbort great work, and soon KiCad has one importer more
To my knowledge, you did not had any prior informations about the file format, and reversing this from scratch is always lots of work. Kudos for not only starting this project, but actually finishing it.
Yes. I am finding this issue already. My colleague has a more advanced license than me and in the office we’d normally be exchanging dongles whenever each needed to do something more advanced. Unfortunately in pandemic times, he has kept the advanced Dongle.
Unfortunately as it stands you still need a CADSTAR license to convert the binary .pcb format into a .cpa format.
In future I hope to also reverse engineer the .pcb format, but that will take a lot longer and the brief time I spent looking at it, I didn’t even know where to start.
UPDATE: The CADSTAR PCB Archive importer has now been merged into the master branch.This should trickle through into the nightly builds within the next few days.
Thanks to all the developers that have helped me along the way with my annoying questions and thanks especially to Seth Hillbrand (@Seth_h) for spending the time to do the final review on the code before merging!
I’ll now crack on with the CADSTAR Schematic Archive importer.
The Windows nightly builds now include the CADSTAR PCB Archive importer (anything after r17389) and can be downloaded here: https://kicad-downloads.s3.cern.ch/index.html?prefix=windows/nightly/ (Remember nightly builds are just for experimentation / testing and should not be used for production environments). To use the importer, you need to open Pcbnew standalone (not via the project manager) and go to File -> Import Non-Kicad Board File… -> Choose “CADSTAR PCB Archive files (*.cpa)”
I am in process of writing the CADSTAR schematic archive importer and should hopefully finish before feature freeze. During feature freeze, I plan on spending all my time fixing any bugs/innacuracies of the importer as I want the importer to be as accurate as possible.
In the meantime, I’d really appreciate it if anyone is able to do some testing of the importer.
It would be great if anyone would be able to open the design files in the Design viewer, import the design into KiCad and do a side-by-side comparison. During feature freeze (i.e. after 30th September) I’ll go through all the reports and fix them as best as possible.
@cedric Yes, I don’t think Zuken are particularly interested in getting Cadstar working in linux…
Just for interest, did you get a chance to try the latest nightly build? I think the error you were seeing about design being too large (when it actually wasn’t) should be fixed with commit 54677296. Please do let me know if there are other issues.
I’m most interested in knowing about conversion inaccuracies such as incorrect size or position of elements compared to the Cadstar design.
Sorry if I gave that impression. It is actually the opposite: I am running everything on Windows (I can’t get my head around Linux). I was just asking for some help in testing the importer as I am only one guy and struggling to do everything on my own.
During feature freeze I plan on doing extensive testing with as many designs as I can, opening in Cadstar and next to it the result from the importer.
That is quite interesting. I didn’t know the history.