Exported gerber is inappropriate for production

Bug #1188934 reported by Dmitry Golovin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Invalid
Undecided
Dmitry Golovin

Bug Description

Most of the software that is used in PCB production couldn't open gerber that was exported from KiCAD (pcbnew).
The reason is that it's format is incompatible with RS-274X standard.

I found a workaround: open exported gerber in gerbv and then export is again. It works and output from gerbv is fully compatible with RS-274X.
This is not urgent as there is known workaround, but it would be nice to have proper gerber export in pcbnew (maybe borrowing some code from gerbv is a good idea).

Tags: gerber rs-274x
Dmitry Golovin (cyb3r)
Changed in kicad:
assignee: nobody → Dmitry Golovin (cyb3r)
Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1188934] Re: Exported gerber is inappropriate for production

Maybe post a "diff" made from before and after gerbv. It is an easy way to
illustrate the issue for starters.
On Jun 8, 2013 6:50 AM, "Dmitry Golovin" <email address hidden> wrote:

> ** Changed in: kicad
> Assignee: (unassigned) => Dmitry Golovin (cyb3r)
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1188934
>
> Title:
> Exported gerber is inappropriate for production
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1188934/+subscriptions
>

Revision history for this message
Dmitry Golovin (cyb3r) wrote :

KiCAD gerber export and RS-274X are completely different formats. Posting a diff means posting two full files.
For example (top - KiCAD, bottom - gerbv):
< X71496Y-30512D03*
< X70866Y-30512D03*
< X70236Y-30512D03*
< X74173Y-32480D03*
< X74803Y-32480D03*
< X75433Y-32480D03*
< X75433Y-30512D03*
< X74803Y-30512D03*
< X74173Y-30512D03*
---
> G01X0055748Y-018701D03*
> G01X0055118Y-018701D03*
> G01X0054488Y-018701D03*
> G01X0054488Y-020669D03*
> G01X0055118Y-020669D03*
> G01X0055748Y-020669D03*
> G01X0059685Y-018701D03*
> G01X0059055Y-018701D03*
> G01X0058425Y-018701D03*
> G01X0058425Y-020669D03*

Actually I have got few projects done in KiCAD and then converted with gerbv, I can post the full projects in both exported and converted variants. Would it help?

Revision history for this message
Dmitry Golovin (cyb3r) wrote :

Oops, my bad. This is a wrong part of diff. The real one would look like this:
< X55748Y-18701D03*
< X55118Y-18701D03*
< X54488Y-18701D03*
< X54488Y-20669D03*
< X55118Y-20669D03*
< X55748Y-20669D03*
< X59685Y-18701D03*
< X59055Y-18701D03*
< X58425Y-18701D03*
< X58425Y-20669D03*
< X59055Y-20669D03*
< X59685Y-20669D03*
---
> G01X0055748Y-018701D03*
> G01X0055118Y-018701D03*
> G01X0054488Y-018701D03*
> G01X0054488Y-020669D03*
> G01X0055118Y-020669D03*
> G01X0055748Y-020669D03*
> G01X0059685Y-018701D03*
> G01X0059055Y-018701D03*
> G01X0058425Y-018701D03*
> G01X0058425Y-020669D03*

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On Jun 8, 2013 7:50 AM, "Dmitry Golovin" <email address hidden> wrote:
>
> Oops, my bad. This is a wrong part of diff. The real one would look like
this:
> < X55748Y-18701D03*
> < X55118Y-18701D03*
> < X54488Y-18701D03*
> < X54488Y-20669D03*
> < X55118Y-20669D03*
> < X55748Y-20669D03*
> < X59685Y-18701D03*
> < X59055Y-18701D03*
> < X58425Y-18701D03*
> < X58425Y-20669D03*
> < X59055Y-20669D03*
> < X59685Y-20669D03*
> ---
> > G01X0055748Y-018701D03*
> > G01X0055118Y-018701D03*
> > G01X0054488Y-018701D03*
> > G01X0054488Y-020669D03*
> > G01X0055118Y-020669D03*
> > G01X0055748Y-020669D03*
> > G01X0059685Y-018701D03*
> > G01X0059055Y-018701D03*
> > G01X0058425Y-018701D03*
> > G01X0058425Y-020669D03*
>

Can you identify the chosen format being used by pcbnew? It must also be
widely recognized, I have had no problems getting boards made. And gerbv
recognizes it too....

Revision history for this message
Chris Gibson (chris-w-gibson) wrote :

According to the official Gerber spec at ( http://www.ucamco.com/Portals/0/Public/The_Gerber_File_Format_Specification.pdf ) the repetetive G01 is not required. It is only actually required once until the mode is changed. I *think* this is what KiCad does.

This would seem to be borne out by the fact that KiCad gerbers load fine into Pentalogix (Lavenir) Viewmate, Cam 350 (surely the the two most common ones in the professional world?) and Gerbv without problem. I've had 6 KiCad PCBs done in the last 2 months and had zero questions or queries from the PCB manufactuers.

Is OP seeing something else?

Revision history for this message
Lorenzo Marcantonio (l-marcantonio) wrote :

On Sat, Jun 08, 2013 at 01:43:32PM -0000, Dick Hollenbeck wrote:
> Can you identify the chosen format being used by pcbnew? It must also be
> widely recognized, I have had no problems getting boards made. And gerbv
> recognizes it too....

Technically the G-code is modal (i.e. it has not to be specified for
every record), so pcbnew *is* gerber conforming. Citing page 11 of the
ucamco spec (which is *the* gerber standard)

    Each code applies to coordinate data located in the same data block
    as the code and to all subsequent coordinate data until another code
    of the same type is encountered, or a new layer is generated. This
    continuing action is referred to as modal.

In short, G1 has not to be repeated for each movement. In fact even the
D code and the coordinate values are modal in gerber! I.e. the
following:

G01X10Y20D03*
Y30*
Y40*

is the same as

G01X10Y20D03*
G01X10Y30D03*
G01X10Y40D03*

(and it would be indeed useful for IC pads). However since hopefully we
are not still using paper tapes to drive NC machines it's more important
these day :D

That said I can assure you that pcbnew gerbers are

a) gerber compliant

and

b) correctly read by gerbtool, cam350 and genesis2000 (and AFAIK this
   covers *a lot* of the installations around the world)

So I'd ask your fabricator which kind of sucky software is using...

--
Lorenzo Marcantonio
Logos Srl

Revision history for this message
Chris Gibson (chris-w-gibson) wrote :

....and Gc-Preview and Viewmate....

Changed in kicad:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.