It looks like you're new here. If you want to get involved, click one of these buttons!
Hello, sir,
Klayout is a great software, but I have a problem when I use it. How to export GDS files into Gerber files, such as .gbl? The current save as is a .pcb file. I don't know how to open it with other EDA software, except Layout.
Thanks,
shure yang
Comments
KLayout is not fully bi-directional in terms of supported data formats.
The writer supports the formats listed below.
The Gerber 274x format is for input (reader) only.
ChatGPT offers some hints, but my experience was only with LinkCAD many years ago.
Method 1 seems like just a guess by ChatGPT, or maybe it speaks for our expectations.
I'm afraid ChatGPT is wrong here. I am not providing a Gerber export plugin and to my knowledge there is no other implementation.
Technically, Gerber is not well suited to GDS. GDS is mainly based on (piecewise linear) polygons. It has paths and boxes and texts, but everything that can be converted to polygons can be represented as GDS.
Gerber is a format the originates from an input format for photo plotters. Those are devices that move an aperture to expose some photosensitive film in places where you want to have Copper on your PCB. So a circular aperture moved in a straight line gives you a path with round ends and a width given by the diameter of the aperture.
RS274x is not much different from this, and they have even added inverse layers or programmable apertures. All of that can be converted to polygons (with some computational effort), but converting polygons back to aperture movements is not possible in the general case - for example at acute convex corners.
RS274x can represent polygons too, using G36 and G37 control codes, but at a price I don't know. There are for sure implications such as overlay rules which are explicitly specified in RS274x, but not in GDS. So every conversion of GDS to Gerber has to do some area normalization (merging, decomposition into hulls and holes) before it can dump the polygons to Gerber. I am quite sure there are limitations such as a maximum number of vertexes, and maybe some PCB vendors do not accept polygon-style Gerber files or have trouble printing them. PCB software may also have trouble importing these files. The board files I saw so far were still aperature style.
I am not a Gerber expert, so I can't tell whether G36/G37 is a feasible option. If it is, and the boundary conditions are known, I am fairly sure a converter can be coded rather quickly, for example as a Python script. I personally don't have a use case for that direction of conversion. Gerber to GDS was provided to add Gerber PCB information to a silicon stack - for example for verification or simulation of board/chip combinations or modelling of redistribution layers.
Matthias