RE: [kicad-users] Re: composite layers and negative plots

2007-09-21 Thread Robert Kondner
Hi,

 

  That RS-274-X spec has more holes than Swiss Cheese.

 

  For example: If you start a Poly Fill and use a ARC I guess the ARC
becomes part of the the poly edge, correct?

 

  Doing so results in a polygon with circular voids. This is a huge area for
Interpretation Errors in gerber processors. Now add to the fact that these
polygons could be in clear or dark areas of a single layer and the multiple
layers COULD be combined. Good luck finding 2 gerber processors that render
this to the same film image.

 

  Chance are about 5% that you get a call from the PCB vendor. Chances are
95% that you get back a bad PCB. Worse yet the location for finding errors
in circular voids is in an internal plane. Shorts in a plane are like an
unforgivable sin, nothing can save you.

 

  After many years of doing PCB designs and the writing of a gerber reader
(MUCH more difficult than writing gerbers) my suggestion is Keep It Simple
(KISS Solution).

 

  The generation of gerbers and their resulting rendering to film must be
ABSOLUTLY PERFECT. We live and die by this level of perfection. To achieve
this level of perfection think of a gerber as a vector driven bitmap. No
Aperture Macros and no  Polygons need to apply. Even if 99% of the code in
the industry reads and processes PERFECTLY that 1% is a reason NOT to use
them.

 

  We need ROCK SOLID routines for flattening a higher level structure of
shapes. The output is a set of scan lines that paints the required image.

 

  I write in Delphi, I can easily generate .dlls, and the resulting scan
lines could convert directly to KISS generation of gerbers. I have a simple
gerber reader that is used to read from LOTS of different apps. It took
years learning what liberties every app programmer could take with gerber
generation. Lets NOT to the same thing in DRIVING film plotters.

 

 

Summary:

 

  We live or die with gerber generation. If we even need to talk to a fab
house about gerber processing we are dead meat.

 

  I would love to see a solution got this gerber generation issue.

 

Thanks,

Bob Kondner

 

  

 

  _  

From: kicad-users@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Geoff Harland
Sent: Friday, September 21, 2007 12:06 AM
To: Kicad Users
Subject: [kicad-users] Re: composite layers and negative plots

 

Hi Ben,

 

I have a copy of the RS274X specification, and this states that the G36 and
G37 commands are actually used to turn on Polygon Area Fill and turn off
Polygon Area Fill (respectively). There are other commands which can be used
to change the polarity of a Gerber file's contents (i.e. whether any
draw and stroke commands which follow are dark or clear, or
positive or negative in nature), but the G36 and G37 commands are used
in conjunction with a set of vertexes whose associated region is to be
entirely filled. The related specification specifically states:

 

... G36 and G37 provide a more efficient means of filling closed polygons
than stroke fill. When these codes are used, the filled area is defined
simply by its closed outline. Stroke fill is an inefficient method of
filling a polygon. ...

 

I haven't studied the relevant (source) code (for KiCad) in depth, but I am
still picking that the G36 and G37 commands have deliberately been used
because it is far easier to depict poured copper areas within Gerber files
by using those commands rather than by using stroked fills instead.

 

It probably would be possible to make changes to the relevant source code so
that users subsequently had the option of generating Gerber files using the
G36 and G37 commands (the existing way), or otherwise by using stroked
fills instead. That said, while I can't speak for any of the other
developers, my personal attitude is that I would rather spend the limited
amount of time that I have available (for improving KiCad) in implementing
various other improvements.

 

While that attitude might seem harsh or unreasonable, I am also of the view
that PCB manufacturers *should* be able to cope with any Gerber files whose
contents are fully compliant with the RS274X specification. If you, or
anybody else, can provide proof that any Gerber files created by KiCad are
*not* fully compliant with that specification, then I would be fully
prepared to look at the relevant source code, and make any changes which
would be necessary to make those files fully compliant. But as I don't have
unlimited time available for making improvements to KiCad, I am not of an
inclination to make any changes for the benefit of any PCB manufacturers who
are not capable of dealing with any Gerber files which they *should* be
capable of dealing with.

 

Given the circumstances, my advice would be to advise the PCB manufacturer
concerned that other PCB manufacturers are capable of dealing with Gerber
files which incorporate G36 and G37 commands, so unless they are able to
prove that there are any genuine problems with the contents of any Gerber
files which you have

RE: [kicad-users] Re: composite layers and negative plots

2007-09-21 Thread Robert Kondner
Geoff,

  Thank you for the comments.

  Yes, I did suggest rather radical surgery in the quest for PERFECT
GERBERS. PERFECT GERBERS is asking for a lot but that is what we need.

  The problem with using Aperture Macros is that it implies a tremendous
software task. How can KiCAD verify design rules on planes if the aperture
info in KiCAD is not EXACTLY THE SAME as the patterns in the photo plotter?
I don't think this can be done. :-( 

 Radical? Maybe but do we intend to detect and flag Cutoff or Missing
Spokes in planes? If so they we already did all the hard work with thermals
so drawing them with simple shapes should be easy. If we don't completely
error check plane rendering then KiCAD plane generation is very weak.

  To draw a thermal all we need is a center CIRCLE for the inside PAD, the
region outline drawn with arcs and lines, and spokes. Verify of spoke to
region outlines, other spokes, drills or other nets is easy. Now we have
perfect circular plane voids and full error checking without Aperture
Macros. Maybe I missed something?

  Also, the circular void as line segments issue needs a resolution. Do we
chop an arc into segments until we get some max error? Maybe .01mm? A big
pad is going to give a lot of segments. I would suggest simply using arcs.

 The ARC commands are very solid, they are pretty well defined and have been
there since -D. I can accept the idea of using ARCs to draw the outline of a
region, this will give perfect arcs limited only by the photo plotter
resolution. One could then use -X polygons to fill in the main body of the
region just as scan lines can be used. I found -X Poly operation rather
consistent though scan lines are less complex.

Summary:

  Just Say No to Aperture Macros

  Outline copper regions with Lines and Arcs.

I am open to ideas.

Thanks,
Bob Kondner

-Original Message-
From: kicad-users@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gharlandau
Sent: Friday, September 21, 2007 1:02 PM
To: kicad-users@yahoogroups.com
Subject: [kicad-users] Re: composite layers and negative plots

I fully agree that there are many aspects of the RS274X specification 
that leave a lot to be desired, but I'm still not convinced of the 
merits of totally forsaking the use of Aperture Macros and Polygon 
commands.

The copy of the RS274X standard which I have (an Acrobat file which I 
downloaded from a website some years ago) makes no specific reference 
to being able to use Arc commands in conjunction with Polygon 
commands, so I concur that it would be desirable to avoid using that 
combination. And I also think that it would be highly desirable to 
avoid incorporating different layers within the same Gerber file (re 
using both dark and clear polarities).

But I think that totally avoiding the use of Aperture Macros could be 
taking things too far. As long as the value of each parameter (for 
each primitive that is used within an Aperture Macro) is explicitly 
defined, and no algebraic substitutions are required in that 
regard, I would regard the usage of Aperture Macros as acceptable 
(assuming that no attempt is being made to push the limits of the 
RS274X specification at the time).

A really extreme view of Gerber files is that they should *never* 
incorporate *any* Arc commands either, least some PCB manufacturers 
not be able to cope with them. Would you advocate that as well?

I have not really looked at the source code for generating Gerber 
files so far, but when I get a chance, I will take a look and see if 
there are any aspects where improvements could be made to at least 
reduce (and preferably totally eliminate) the possibility of Gerber 
files' contents ever being misinterpreted.

In that regard, I would regard it as preferable to use an Aperture 
Macro (incorporating a type 21 / centered line primitive) to define 
an aperture for a pad having a rectangular shape on a non-orthogonal 
angle, rather than using a Polygon command, and there could well be 
various other aspects which could also be improved.

And maybe something else which should be considered at some stage is 
providing the feature of generating (sets of) ODB++ files from PCB 
files. While I am not currently an expert on such files, it is still 
my understanding that they don't suffer from the shortcomings that 
afflict Gerber files (due to the shortcomings of the RS274X 
standard). However it is also my understanding that many PCB 
manufacturers are not yet equipped to handle such files, and I gather 
that some of them haven't even heard of such files. But doubtless any 
PCB manufacturers who actually can cope with such files would still 
prefer to receive them whenever that is possible.

Regards,
Geoff Harland.


Robert Kondner wrote:

 Hi,
 
   That RS-274-X spec has more holes than Swiss Cheese.
 
   For example: If you start a Poly Fill and use a ARC I guess the
 ARC becomes part of the the poly edge, correct?
 
   Doing so results in a polygon with circular voids