Malformed contour.gm1 file with custom PCB shape

TL;DR 1.05 and 1.06 create duplicate %ADD10C entries in contour.gm1 making it malformed so it doesn’t work with JLCPCB online viewer.

Steps I took that resulted in the problem:

  1. Created a new PCB project
  2. Downloaded the custom PCB star example from https://github.com/duff2013/Fritzing-Custom-PCB-HowTo/blob/master/custom_star_pcb.svg
  3. Used that PCB as a custom board shape
  4. Exported my project as extended Gerber
  5. Uploaded to JLCPCB. The online viewer showed a rectangle not the star
  6. Edited the contour.gm1 file. Saw that there were two different ADD10C command
    %ADD10C,0.005000*%
    %ADD10C,0.008*%
    Also there were duplicate G54D10* commands.
  7. Deleted the line %ADD10C,0.005000*% and one of the duplicate G54D10* lines
  8. Re-uploaded to JLCPCB. The online viewer showed the correct PCB shape, showing the duplicate entry was the problem.

What I expected should have happened instead:

It should have had only one %ADD10C entry in contour.gm1

My version of Fritzing and my operating system:

1.06 on Ubuntu Linux


Star.fzz (2.0 KB)

Please also attach any files that help explaining this problem

@sewnbacktogetherwron Your best bet is to post in

As a data point the sketch appears to work correctly for me on Fritzing 1.0.6 on Win10 (here is contour.gm1 displayed by gerbv):

Peter

Hi Peter,
Thanks for the follow up! I’d be curious to know if the output you produced from the Windows version includes two ADD10C lines in _countour.gm1?
%ADD10C,0.005000*%
%ADD10C,0.008*%

I tested my malformed star pcb in gerbv and it displayed fine. I also tested in in PCBWay’s online viewer and it displayed fine. It was only in JLCPCB’s online viewer that it appears corrupt due to the duplicate ADD10C lines. So it seems like only some viewers have problems with the duplicate ADD10C lines.

Thanks!

Yes, but that doesn’t appear to bother gerbv (and may be a bug!)

Peter