Copper Keepout Vector

Hi, I am wondering if there is a way to generate a copper keepout area of a given vector shape. Basically I would like to be able to print graphics as negatives in the copper layer, and I’m struggling to find a good way to do this. The footprint generator only does positive copper layers, and the keepout on through holes is limited to basic geometry like circles, etc…

Is there any way to generate a negative on the copper plane of a given vector shape?

What kind of shape do you have in mind, do you have an example screenshot?

I have a variety of graphics I’d like to do this with, but here’s one example. This is a footprint created from a png using the bitmap2component utility. I can easily transfer this onto the copper layer by exporting it to F.Mask using a text editor to replace all instances of F.Mask with F.Cu, but this creates positive copper, rather than negative copper.

I’d like to be able to create a cutout of exactly this shape in a solid copper plane.

Also, the reason I don’t just export a negative in bitmap2component is that with the way vector translation is handled the negative footprint ends up being a different shape that doesn’t exactly match up with the positive footprint. I would like all versions of the footprint to be exactly the same shape so that they can line up on top of each other exactly.

Depending on how often you need this and what are your other needs or limits, there are a couple of ways to do this.

First, if you are willing to get your hands dirty, you can edit the file directly. A graphic polygon looks like this in .kicad_pcb:

(gr_poly (pts (xy 207.01 130.81) (xy 199.39 133.35)

A keepout area looks like this:

(zone (net 0) (net_name "") (layer F.Cu) (tstamp 0) (hatch edge 0.508)
    (connect_pads (clearance 0.508))
    (min_thickness 0.254)
    (keepout (tracks allowed) (vias allowed) (copperpour not_allowed))
    (fill (arc_segments 32) (thermal_gap 0.508) (thermal_bridge_width 0.508))
        (xy 203.2 90.17) (xy 198.12 100.33)

So you can draw a keepout area and copy the polygon points from your polygonal graphics into the keepout.

Maybe this could be done with a python action plugin, too.

In the unstable development version 5.99 it’s possible to convert shapes. This must be done with two conversions (I don’t know why there’s no direct conversion):

  1. Open the context menu of a polygon.
  2. Convert -> to Lines
  3. Keep the original selected without clicking again, then move it away or delete it.
  4. Select the lines.
  5. Context menu -> Convert -> to Rule Area.