Text in Copper Zone

I created an update and added a few commands, including fromsvg that can take the ‘d’ attribute from the ‘path’ element of an SVG file.

I took the graphic and traced over it with straight lines in inkscape then took the resulting SVG:

Then I created the following command in KiCommand (it’s quite a long string and must be on one line within double quotation marks):

"m 81.38357,74.230848 5.612659,1.870887 5.211757,3.474503 2.138156,2.138157 10.958048,-6.1472 0.53454,5.078121 -1.06908,4.009044 -2.80633,4.276312 -2.539056,1.603616 1.202716,4.276312 9.48806,-2.939963 13.36348,8.686253 -8.95353,-0.4009 -2.13815,5.34539 -5.21176,-2.67269 -4.67722,4.54358 -2.40542,-3.0736 -4.009046,6.94901 -3.741775,4.27631 -4.142676,2.53906 1.870887,3.34087 v 3.34087 l -4.409948,2.53906 h -2.806329 l -2.80633,-0.53454 -0.267271,-2.00452 1.469982,-1.60362 0.668176,-0.4009 -0.53454,-1.73726 -4.142676,0.53454 -4.677217,-0.93544 -3.34087,-0.66817 -1.336347,-0.13364 -2.405428,3.87541 -1.469982,1.33635 -1.603616,0.66817 -5.479026,-0.66817 -2.405425,-2.80633 -0.133636,-1.60362 3.207235,-3.34087 1.870887,-2.53906 -2.80633,-2.93996 -2.672696,-4.40995 -0.668174,-2.40543 -4.409945,5.47903 -3.207234,-5.34539 -5.078121,2.13815 -3.474506,-6.14719 -8.285356,0.26726 13.229844,-8.418985 10.022607,4.81085 0.400905,-5.34539 -3.741775,-2.138156 -2.405425,-3.474503 -0.668173,-3.073601 v -7.884451 l 13.363474,5.078121 3.608139,-2.939965 5.211757,-2.271789 3.875408,-1.33635 2.138156,0.133636 3.207234,-3.474503 4.677217,-2.939965 2.405425,-0.668174 z" 1 mm fromsvg drawsegments

This results in the following within KiCad:

With preceding param command to set the layer and the thickness, it can be drawn on any non-copper layer (including Edge.Cuts). Then if followed by the tocopper command, it can be put on any copper layer.

Is this what you had in mind?

3 Likes

That is pretty cool!
I just have not had the time to spend on this.
Any chance you can export that something I can easily use?

Not sure what you mean. If you install KiCad and cut/paste the command I listed into the KiCommand dialog box, it will draw the line segments just like I pictured.

What else did you have in mind?

I need to figure out how to run KiCommand.

Link to installation instructions, just copy some files:

If you’re running 4.0.7, bring up Script Console and type: import kicommand

2 Likes

I’m trying to used KiCommand to render the selected text object on the F.Cu layer. Using current github master and the following command:

toptextobj selected Dwgs.User texttosegments F.Cu tocopper

I’m seeing activity on the KiCommand stack as presumably operations are executed, but I don’t see either the segments show up on Dwgs.User or the final result on F.Cu. Any ideas, @HiGreg?

Try changing the view to legacy and back to OpenGL. This should refresh the display so you can see the new objects.

That was it! After refilling my ground plane, it looks great. Thanks for making this so easy with KiCommand.

1 Like

Awesome! Glad it worked for you!

Any chance the layer could be simply edited from F.Cu to “Keepout area” in the file? Or is this impossible?

Is it possible to do the ‘inverted copper’ as shown? image

Not directly, but the expanded Gerber standard supports black and white (positive/negative) plotting, so you could plot the text on a separate layers and then instruct the board fab to add as negative to the coppers, or you could manually edit/append the copper Gerber files with the negative header + text.

Doing this, the user (of course) needs to take care to ensure the negative text does not cross any traces :slight_smile:

Not sure how to do this. Does anyone know what layers/objects in KiCAD would create this?

A bit late to the party but here we go:

I see two options.

One option would be to create keepout area(s) from the text. This keepout area(s) can then be placed inside a zone.

The second option is to create a custom pad that is a rectangle on the outside and has the text cut away. (Sadly there is no “negative” pad shape so you would need to create a single polygon with the text removed. Have a look at this part of the kicad-footprint-generator for inspiration)

1 Like

The lazy solution is to just trace over the text with traces, then it shows as desired.

Edit: Reread the later question, Yes keepout zones set to arbitary slope is a way to accomplish it, little bit annoying, but it functions.

edit: For the “e” at the left end of the horizontal stroke, I went up, traced out the top void, then continued down on the tail

2 Likes

Keepout areas are zones, filled zones could be converted to keepouts, but not tracks or letters. And text is a simple item with the text string and properties in the file, it’s not lines and can’t be converted to something other.

There is a wish for this: https://bugs.launchpad.net/kicad/+bug/1463857

1 Like

Creating the text only on the Mask layer, while being the copper layer filled behind it, will result almost the desired pattern (without the clearance contour).

2 Likes

Resurrecting ancient threads so members have to wade through many outdated posts is silly
For new, relevant information, please start a new thread.