← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Option to subtract soldermask from silkscreen in gerber output


Le 07/12/2010 17:41, Lorenzo Marcantonio a écrit :

On Tue, 7 Dec 2010, Dick Hollenbeck wrote:

On 12/07/2010 03:08 AM, Marco Mattila wrote:
I tested the output with gerbview and gerbv. In gerbv everything's ok.
Now that I checked again with gerbview the negative layer kind of
works. However, since negative layers in gerbview are taken care of by
drawing them in background color, the negative stuff will be
"subtracted" from all layers below the negative layer. Fixing this
probably requires that the drawing of a layer is first done onto a
temporary device context/bitmap and blitting the result to the main
window. I can take a look at this.

I'm not suprised. There are even fabs services which don't handle
negative layers out there... layers are an 'advanced' gerber feature (even if
it's in the standard!) and not everything handle them correctly. The
most portable way to subtract the pads from the silk is, indeed,
computing the subtraction in core and outputting only the remaing parts.
Which is, of course, a PITA (kbool would help and in facts it's very
similar to the clearance check in the DRC). Well, there is a whole
business in gerber postprocessors, there must be a reason for this :D

I am *expecting* problem using negative layer, but since it's an
optional feature I'd just say something like "warning: this function
need a complete gerber implementation and could fail with most other
ones out there :D"

First, note a layer in Gerber world have nothing to do with a board layer (the near object is a Gerber image).

Now, Gerbview has a decent support of most of Gerber commands including negative layers.
Only the obscure KNOCKOUT command is not handled.
So a better way to draw Gerber images when including negative objects is welcome.
And draw an image onto a memory bitmap and combining (ORing)the resulting bitmap with the screen bitmap (for each image) is an intersting approach.
(Gerbv does a similar thing, but this is a feature supported by the graphic library used by Gerbv)

Having said this, I am also thinking negative objects create problems in Gerber software,
mainly for "DRC" at Gerber level that is very difficult if an image has negative areas.

Therefore, for copper layers, negative objects are not used in Pcbnew.

Perhaps, this DRC problem is acceptable for technical layers like silk screen.

Note also boost::polygon is used in Kicad and is more easy to use and faster than kbool in many cases (not all), and could replace kbool.

Jean-Pierre CHARRAS