Zuken CR-5000 to KiCad converter

Within the collaboration of the KiCad OpenVentilator Group http://openventilator.gitlab.io/, I developed a Python script to convert Zuken CR-5000 (ASCII) PCB files to KiCad.

I programmed this in a rush, so it has some amount of hacks, but it is general enough so that 5 original Zuken boards were succesfully converted, and I was able to reproduce complex padstacks with copper removed on some inner layers, so that the Gerbers match faithfully the originals.

In case someone wants to give it a try for his projects or reuse it, it is available as open-source in this repo:

Note: if i were to reprogram it again from scratch, I would not do the intermediate conversion to JSON, that made more trouble than anything, but anyway…

10 Likes

Great work, and lots of code you have written.

In case you ever want to reprogram it from scratch, I suggest you to integrate it directly into KiCad itself.

2 Likes

Nice,
it would be useful to have a repository with only the script needed to make the conversion.
Then it could be easily converted to a kicad action script or even converted to cpp to be integrated to main code.

Thanks for you feedback!

I think the problem right now is that KiCad does not support padstacks, while Zuken relies heavily on them. So I think it is not worth for the moment to reprogram the script again, before KiCad support full padstacks. For these 5 boards, I managed some workarounds / hacks to make it match the original padstacks, but that required a lot of extra lines of code.

Ideally, KiCad should also support round track segments (instead of many small straight segments). That would also save many lines of code xD.

As said before, it would be nicer to use https://sexpdata.readthedocs.io/en/latest/ instead of my workaround with JSON conversion.

KiCad nightlies already support arc traces, and my Altium importer uses them fairly successful.

For missing padstack, yep, this thing is holding back my importer as well, and I did not write a workaround yet. Perhaps it will be integrated into KiCad 6 when someone stands up, otherwise we need to wait until KiCad 7.

2 Likes

Does it also support arcs as part of the zone outline?

arc in polygons are not supported yet to my knowledge. But I suspect they are part of the KiCad 6 plan (if not, @devs please add them). Perhaps, if everything fails, I add them myself. Better than adding a workaround into the importer.

It seems SHAPE_LINE_CHAIN already supports arcs, but I never tried them out.

It’s interesting that people talk about polygons with arc shaped edges. That’s impossible by definition - polygon has straight edges. I don’t mind, though.

Yeah, KiCad uses the word “polygon” to mean “closed shape” most of the time, so we may have to update that language :slight_smile:

OK, I’ll update this wikipedia article: https://en.wikipedia.org/wiki/Polygon :laughing:

Haha, I meant we have to change KiCad :slight_smile: “closed shape” is a bit awkward. Altium uses “solid region” (kind of equivalent to KiCad graphical polygon, but can be copper too) and “polygon” (KiCad zone) – yes they say polygon even though theirs do support arcs.

@craftyjon how much work to add arc polygons in Kicad :wink: ?

I will take a look at that, it’s vaguely related to some other stuff I am working on

1 Like

@twl has something in the works on this, I believe.

:+1:
Although a circumference is a polygon with infinite sides and a straight line is a circumference with a infinite radius.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.