Text in Copper Zone

For electronic prototyping I use a circuit board plotter (milling machine) to mill my PCBs.
Each copper-free surface must be milled line by line. To speed up I use copper zones, so that the plotter only removes copper between the wires/pads and the blank copper planes.

An exception is simple text. The copper zone filler doesn’t smoothly enclose the text but makes a rectangular plane as in the pictures (bottom-left)

Is there an easy way to help the copper zone filler to smoothly enclose a text like in these two pictures?



In the Coper Zone Properties there is a drop down menu in the lower left for selecting the time of Corner Smoothing.

You may also want to change the Segments / 360 deg: to 32.

@te-bachi, Do you want to create a text negative in the copper zone?

As in the real picture (copper circuit board with date in the lower left corner, NOT made with KiCAD) in my first reply, I’d like to have something like this:

Is this possible in KiCAD?

Yes. Straight forward.

Put the text on a zone in the same layer. Then refill the zone.

The text is on the same layer as the filled copper zone. I use the settings as in the screenshot,.
But I always get this:

How can I have this?

I use KiCAD 4.0.7 (release version from the wesite).

If kicad can not do it maybe you can make a small footprint just for the text with svg2mod. (Use Inkscape to design this.)

My idea would be to place the text, duplicate it and give the duplicate a outline larger than double your clearance settings.

Convert both your background and fat text objects to a path. (path->outline to path)
It might be a good idea to look at the resulting fat text path and modify it a bit. (remove internal holes and maybe straighten it out where necessary.)

Subtract that duplicate from a rectangle that is larger than the text. (path->difference)

Move the original text and the resulting background rectangle to a layer called F.Cu and use svg2mod to create a footprint from this.

But you might still get a outline with the zone clearance around this rectangle. (you could place pads around there with mask disabled. Connect them to the same net as your zone.)

You might also convert the text strokes into draw segments, then into tracks with KiCommand. If help is needed on the workflow, let me know!

You may be able to use the following utility to create the text as line segments in a gEDA footprint which can be imported by kicad easily, but you’ll then need to move them onto the copper layer from there and/or fiddle with clearances

This is quite easy to do hacking the gerber files.

Subtracting text from copper pour
1 Put the text on a layer you don’t use for anything else let’s say F.Adhes
2 Plot to gerbers
3 Change the index of the aperture for the text in the top adhesive layer to something that isn’t used in the top copper layer. Append the adhesive gerber to the end of the copper gerber. Put the command *LPC* before it to subtract from the copper pour.

To create the effect you want you could instead
1 same
2 same
2.5 increase the size of the aperture for the text
3 same
4 Invoke *LPD* for positive printing once again and add the text again with another new aperture with the original size.

Hacking gerbers isn’t optimal from an DRC perspective, but it’s a fair bit of fun.

1 Like

I see. in this case maybe the text is too close to the edge, so the “black” rectangle around the text is the clearance area.

If you don’t do a copper erase of all the blank areas in your gerber processing software, all the router will do is draw a single line rectangle around the text clearance area. I will try and find a photo of an example.

Edit: found a slightly tatty board from ages ago

So, I bypass KiCAD? I use KiCAD to layout the board with text without using the filled copper zone? The gerber processing software will post-process the gerber-files so that milling a board will only use single lines?

I don’t control the milling process… I just send the gerber files to another person and get the physical boards back :worried:
I prefere to do everything in KiCAD…

I tried svg2mod. I can see the module in the “library browser” but can’t insert it into the PCB board.
I didn’t do your complicated process with substraction etc… just a simple text -> convert to path -> set layer name to “Cu” and export it to a pretty KiCAD module…
Is it important to use your process?

This could be a solution.
I just saw your KiCommand repo on github.
But how can I convert the text into draw segments (and then to tracks)?
I installed the scripts and enable kicommand:

It is a bit difficult to explain if you don’t do the milling process yourself and without knowing how the person producing the board works, but the procedure is usually done in two stages.

The first stage is to cut all the clearances around the traces, pads, zones, text etc. to produce the clearances as set in the Kicad design rules, producing a board layout that matches the schematic connectivity.

The second procedure using a much larger cutter cuts away all the copper from the areas on the board like the clearance area around the text in your first picture, but you do not have to do the second procedure if it is not necessary. The only time I use it is when working with 0.5mm pitch components to make solder bridges under ic’s a lot easier to avoid.

If you discuss this with the person producing the board I am sure they will be fully aware of all this.

As a F.Cu layer, I cannot add it to the board.
As a Edge.Cuts layer, it works… but I need it as a F.Cu, not as a Edge.Cuts :disappointed:

And svg2mod doesn’t convert the letter “a” correctly…

The problem is likely to be that you are attempting to turn outline defined fonts, i.e svg, ttf, or PS, into toolpaths/gerber plotter outputs for placement on your layout, with the associated problem of loops/holes within glyphs.

What you ideally need for these applications are centreline defined, a.k.a. engraving, fonts.

The FootprintTextForPCB utility mentioned above uses the centreline defined Hershey engraving fonts for this reason.

If you are using Inkscape already, I believe there is the ability to install the Eggbot Hershey fonts for such uses, which can then be exported as gcode or paths. There is also the Inkscape2pcb export script on github which can export a gEDA PCB format footprint from Inkscape that Kicad can easily import, which is an alternative to svg2mod that uses Inkscape’s own internals to converts paths to segments, but ignores polygons, unlike svg2mod.

There are lots of ways to skin this particular cat, but a centreline defined font is probably the most important aspect if converting to line elements.

Good luck,


1 Like

I just looked at this again and realized not all the commands necessary are in KiCommand. I’ll fix this in the next few days and repost here when ready to download. I’m reworking the todrawsegments command to take text objects as a parameter. The command string will be something like:

toptextobj selected F.SilkS todrawsegments F.Cu tocopper

Edit to add: I have already extracted strokes from text in KiPadCheck, and I’m in the middle of updating command definitions. Once I get the update working and porting the code from KiPadCheck, I’ll post the update.

Working on a solution with KiCommand. Still in development.

Text Size W/H/T 1.5/1.5/0.3
Top is text on F.SilkS
Middle is segments on F.SilkS
Bottom is tracks on F.Cu
Zone is clearance = minimum width = 0.0254

The command string assumes the desired text is selected. It copies the text to F.SilkS as drawsegments, then copies those drawsegments to tracks on F.Cu. I’ve moved the text and the drawsegments to non-overlapping just for the screenshot. I added the F.Cu zone afterwards and ran DRC (which fills the zone). Neither the zone nor the text have nets assigned.

toptextobj selected topoints delist pairwise F.SilkS todrawsegments F.Cu tocopper

Still working out the bugs.