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

2007-09-21 Thread barkerben
Ah, that makes sense. I tried producing gerbers with fill, no problem.
Then I produced one with some altered pad shapes, and the commands in
question appeared. I have emailed Olimex to ask them about this :-)

Thanks for the afvice,

Ben

--- In kicad-users@yahoogroups.com, jean-pierre charras - INPG
[EMAIL PROTECTED] wrote:

 barkerben a écrit :
 
 One more question (I have answered the above myself via 
 experimentation). I got the following from Olimex, who I use to etch 
 boards:
 
 Hi,
 Your gerbers contain composite layers and negative plots (G36 G37 
 commands).
 On such gerbers we can't do DRC check, panelization nor to ensure 
 correct
 phototools plotting.
 Please ask your cad vendor how to generate your copper pour with 
 stroke
 hatch filling instead composites and send your files again.
 Thanks
 
   
 
 G36 and G37 commands are *NOT* composite layers and negative plots.
 
 this a polygon fill command (start and end fill polygon), used to draw 
 rectangular pads  when the pad orientation is not 0, 90, 180 or 270 
 degrees (for instance 22.4 degrees) or trapezoidal pads.
 
 This command is a very common GERBER command...
 
 To understand the gerber rs274x format, see:
 http://www.artwork.com/gerber/274x/rs274x.htm
 
 -- 
 Jean-Pierre CHARRAS
 Maître de conférences
 Directeur d'études 2ieme année.
 Génie Electrique et Informatique Industrielle 2
 Institut Universitaire de Technologie 1 de Grenoble
 BP 67, 38402 St Martin d'Heres Cedex
 
 Recherche :
  Grenoble Image Parole Signal Automatique (GIPSA - INPG)
 46, Avenue Félix Viallet
 38031 Grenoble Cedex





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

2007-09-21 Thread Geoff Harland
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 provided to them, then you will look at taking your business elsewhere.
 
While my response probably hasn't matched what you were hoping for, please note 
that I still monitor all of the messages sent to this mailing list, and that I 
am fully prepared, in general, to attempt to rectify any reported defects and 
implement any requested improvements which are submitted by users (whenever my 
available spare time, and my comprehension of the relevant source code, 
permits).
 
Regards,
Geoff Harland.
 
 
barkerben wrote:
 
 I think the problem occurs when I pour copper areas:
 
 find out how to generate your copper pour with stroke
 hatch filling instead composites and send your files again
 
 When I do not pour, there are not G36 or G37 codes,
 when I do they appear. Any thoughts?
 
 Ben
 
 
 barkerben wrote:
 
  One more question (I have answered the above myself via
  experimentation). I got the following from Olimex, who I use to etch
  boards:
 
  Hi,
  Your gerbers contain composite layers and negative plots (G36 G37
  commands).
  On such gerbers we can't do DRC check, panelization nor to ensure
  correct
  phototools plotting.
  Please ask your cad vendor how to generate your copper pour with
  stroke
  hatch filling instead composites and send your files again.
  Thanks
 
 
  Can anyone answer his question?
 
  Cheers,
 
  Ben


  

Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html


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

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

2007-09-21 Thread gharlandau
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. 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




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

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

2007-09-21 Thread Dan
Unfortunately, this isn't a very realistic approach for many Kicad
users I think.  There are probably a lot of hobbyists here, and for
us, there are only a small handful of board houses that make
affordable boards, and Olimex is easily the best of them.  CustomPCB
in Malaysia is also pretty decent, but doesn't do free panelization
like Olimex does.

I don't know what kind of PCB makers you have in Australia, but here
in the USA, the cost of getting prototype (small quantity) boards
made in-country is prohibitive.  The cost of sending it to Bulgaria
and having them ship it over the Atlantic is far cheaper when you're
dealing with simple 1- or 2-layer PCBs.  American boardmakers only
make sense if you're making a multilayer board.

For us hobbyists, Olimex is a godsend as far as I'm concerned.

Dan

--- In kicad-users@yahoogroups.com, Geoff Harland [EMAIL PROTECTED] wrote:
 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 provided to them, then
you will look at taking your business elsewhere.
  




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

2007-09-20 Thread barkerben
I think the problem occurs when I pour copper areas:

find out how to generate your copper pour with
stroke
hatch filling instead composites and send your files again

When I do not pour, there are not G36 or G37 codes, when I do they
appear. Any thoughts?

Ben


--- In kicad-users@yahoogroups.com, barkerben [EMAIL PROTECTED] wrote:

 One more question (I have answered the above myself via 
 experimentation). I got the following from Olimex, who I use to etch 
 boards:
 
 Hi,
 Your gerbers contain composite layers and negative plots (G36 G37 
 commands).
 On such gerbers we can't do DRC check, panelization nor to ensure 
 correct
 phototools plotting.
 Please ask your cad vendor how to generate your copper pour with 
 stroke
 hatch filling instead composites and send your files again.
 Thanks
 
 
 Can anyone answer his question?
 
 Cheers,
 
 Ben