hadleyrich / GerbLook

A web based gerber renderer based on Python, gerbv and imagemagick held together with a little glue and string.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rectangular apertures in outline break render

CapnKernel opened this issue · comments

Every two weeks, I get a large order from someone who uses "Robot Room Copper Connection":

http://www.robotroom.com/CopperConnection/

Sometimes their zips don't render in gerblook. Through bisection I found the reason.

Here's an outline file that doesn't work:

G04 This is an RS-274x file exported by *
G04 gerbv version 2.6A *
G04 More information is available about gerbv at *
G04 http://gerbv.geda-project.org/ *
G04 --End of header info--*
%MOIN*%
%FSLAX34Y34*%
%IPPOS*%
G04 --Define apertures--*
%ADD10R,0.0060X0.0060*%
%ADD11R,0.0070X0.0070*%
G04 --Start main section--*
G54D10*
G01X0000000Y0050790D02*
G01X0080910Y0050790D01*
G01X0080910Y0000000D01*
G01X0000000Y0000000D01*
G01X0000000Y0050790D01*
M02*

And here's one that does:

G04 This is an RS-274x file exported by *
G04 gerbv version 2.6A *
G04 More information is available about gerbv at *
G04 http://gerbv.geda-project.org/ *
G04 --End of header info--*
%MOIN*%
%FSLAX34Y34*%
%IPPOS*%
G04 --Define apertures--*
%ADD10C,0.0060*%
%ADD11C,0.0070*%
G04 --Start main section--*
G54D10*
G01X0000000Y0050790D02*
G01X0080910Y0050790D01*
G01X0080910Y0000000D01*
G01X0000000Y0000000D01*
G01X0000000Y0050790D01*
M02*

The difference is in the aperture definitions:

diff -u ../old/nullA_CASE_PANEL_V5.gko nullA_CASE_PANEL_V5.gko
--- ../old/nullA_CASE_PANEL_V5.gko  2016-03-03 00:25:07.494756442 +1100
+++ nullA_CASE_PANEL_V5.gko 2016-03-03 01:07:45.613888540 +1100
@@ -7,8 +7,8 @@
 %FSLAX34Y34*%
 %IPPOS*%
 G04 --Define apertures--*
-%ADD10R,0.0060X0.0060*%
-%ADD11R,0.0070X0.0070*%
+%ADD10C,0.0060*%
+%ADD11C,0.0070*%
 G04 --Start main section--*
 G54D10*
 G01X0000000Y0050790D02*

My guess is that the version of gerbv that gerblook's using is too old to support "R"-type rectangular aperture definitions. ("C"-type circular definitions seem fine)

Thanks very much for the detail that's really useful. Hopefully a new gerbv version is released soon!