Is there a way to knock one shape out from another in KiCad? For text, there is a knockout option, but it creates a box. Am I missing a trick, or is this a missing feature? Is there any way to subtract shapes on a layer?
I.e. in this example subtract the X from the circle
If you turn the circle into a ācopper regionā (doesnāt need to be on a copper layer), the text can knock a hole into it with āKnockoutā enabled. Make sure to update copper fills (with B key). However the text will still have its rectangular outline.
You didnāt say what you want to subtract the āXā from and/or expose. So, Iāll assume you want to Knock-Out the Copper āXā from Copper layer
Hereās the way I do itā¦ with some examplesā¦, including 'sketched itemsā¦ (Kicad v6)
Pretty much how you already tried, except that you canāt use a filled circle. It should be a ring. Depending on the size of the text you may need to fill empty spaces with e.g. lines. And there are unfortunately pretty large margins around the letter in the box.
Ah. It would be a really nice feature to be able to subtract two polygons from each other on any layer. I guess weād need the ability to create from selection > polygon for text as a prerequisite for this example though.
I admit Iām not clear on āExactlyā what you want, especially regarding the āCircleā (so, clarify it for my old brain).
That said, getting the āXā in Solder-Mask without the Square is simpleā¦
An arbitrary shape such as this, with some black text in it. The image shows a diamond exposing the FR4 inside with some copper layer pattern on the back. Just want to draw text in solder mask on the diamond (or circle, or whatever ).
I did Not use any Zones. The Copper Rectangle is simply a āFilledā Rectangle.
All other items are Footprints made by the āImage_Converterā tool from .png graphics made with Transparent background (in a Graphics program). Double-clicked and set to Back layer.
And, Iām still not clear on your goal - in fact, Iām wondering if youāre wanting āNo Maskā in the shape of a Text āXā that has No masking such that itās Unmasked area exposes the Copper)ā¦ Thatās why I put the Copper Rectangle there so the 3D-view would Clarify for you that a āMaskā covers the Copper.
And, if thatās the case, my first post above exposes what I suspect is your āSubtractionā goal that exposes Copper. And, itās just a matter of which āsideā so, to speak, of the Lines/Text to expose - meaning, it could be the Inverse of my graphicsā¦
Thanks for taking the time to get back to me again. I appreciate it.
Just to make it super clear what I mean by a āsubtractionā operation, I pasted the following graphics (credit goes here). In vector graphics applications (and I guess the footprint editor is just a specialised vector graphics app) a common workflow is to create complex shapes from primitive shapes using subtraction operations. In this example, you can see the more complex shape is subtracted from the simple shape to create a new polygon.
KiCad has the option āCreate polygon from selectionā, so it is almost at the finish line for functionality to do a subtraction op.
The image in my original post has probably added to the confusion as Iād gone off track trying to get the result I wanted. What Iād expect to be able to do is draw a primitive shape, draw some text, convert text to polygon, and then just hit the punch-out/knockout/subtraction button and be on my merry way with the next task. The specific layer is somewhat irrelevant, although F.Mask and B.Mask are unique in that they specify areas where material is not deposited in manufacture, but the technique I mention would be very useful for generating polygons on any layer.
Just thinking out loud here, but with such functionality, we could do away with the slightly odd āknockoutā option in the footprint text properties dialogue and replace it with a more generic workflow.
Iāve written Appās for creating SVG graphics and fully understand āSubtractionā including SVG"sāIntrinsicā subtraction and āPathā usageā¦
You canāt do that in Kicad with layers.
In PCB mfg, when you want to expose (or cover) a particular Area/Shape (having Copper underneath), you indicate it on a Drawing (similar as shown on this product that I have a Patent for), but would indicate āNo Solder Mask Over This Areaā.
Sounds like you should make a Kicad Feature Request (I think thereās a Form/Page to do itā¦ I donāt know but have seen others refer to it.)
Well. I guess Iāll muddle along with the image conversion approach then for now. I put a feature request in over on gitlab. Letās see what the powers think.
FYI - Once upon a time, the SVG specification referred to Path Subtraction as, āIntrinsicā and āwindingā but that is too general/confusing so, they clarified/renamed it to āFill-Ruleā
Below are screenshot of my simple Example of doing it and of older spec example
Good luck!
<?xml version="1.0" standalone="no"?>
<!-- Hand Coded -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="500" height="400">
<!-- Rectangle with cutout. Rectangle points go CW, Cutout goes CCW. That makes it -->
<!-- NOTE: The cutout uses a MoveTo for closing it, instead of "Z" close path-->
<!-- that ensures App's like Fritzing recognizes it, or it will be left 'Open' -->
<path d="M0,0 L500,0 L500,400 L0,400 L0,0 Z
M300,100 L300,300 L400,300 L400,100 L300,100" fill="green" stroke-width="3" />
</svg>