Custom constraints: ignore edge clearance for some footprints

Hi! For several of my PCBs I use “egde connectors” that are to be soldered together at 90 degrees to create a structral joint. At each of these joints, one of the PCBs will have a footprint with pads touching the edge. Given that normally components should have a positive edge clearance, what would be a good way to have pcbnew ignore warnings on edge clearance for these footprints?

Since the pad clearance overrides on footprints doesn’t allow negative values, I’ve tried to use custom design rules like so (all edge connector footprints all have “bridge” as their values):

(rule "edge_joint"
    (layer outer)
	(condition "A.Value == 'bridge'")
        (constraint edge_clearance (min -0.5mm)))

However, when I run DRC, the edge clearance errors still show up. As a sanity check, if I change the min to max, the set of DRC errors stay the same. What am I doing wrong here? Thanks in advance for any suggestions!

1 Like

What actually is that A.Value, “bridge”? Maybe it doesn’t do what you want.

EDIT: sorry, you said it already. I may test this and comment later, if someone else doesn’t.

A.Value is for a footprint, but you need a constraint for a pad. I remember there has been discussion about having access to a “parent” item like A.Footprint.Value, but I think it didn’t lead to anything. Maybe @JeffYoung can say more.

Meanwhile you have to use some other condition.

EDIT: for example, customize the footprints so that you add pads to a group named “edgepads”. Then use a rule like this:

(rule edge
(condition "A.memberOf('edgepads')")
(constraint edge_clearance (min -1mm)))

Yes, you want to use groups for this. We may at some point have some way of addressing an object’s parent, but it would be a lot of work.

Hi guys! I want to get the edge clearances of select components ignored.

The suggested edgepad groups solution works for me, but I’m having trouble with group selection. Nothing happens if I select multiple pads and try to group them via the context menu → Grouping → Group. Instead of pads, I can select components and group them. Then I can add individual pads to the group. But then, I can’t select the groups by pads, only by components. Finally, I can delete the components, and then only the pads remain, but given the above behavior, I can’t select the group by pads at all.

Am I missing something? I’m using KiCad 6.0.11

You have to edit the footprint in the footprint editor and group the pads there, then save the changes to the board. Either modify only the one instance on the board, or edit the library footprint and later update the board footprint.

Is the original question or mondalacis question related to the recently solved issue #14199 in gitlab?

The suggested workflow is quite cumbersome. There’s usually one affected pad per module, so I have to select two pads per module, put them into a group, remove the unwanted pad from the group, and finally, I have to save the module as a new module because I also use the original module on some locations where the edge is not nearby. Is there a better workflow?

As for the board-level pad selection issue I mentioned earlier, can you reproduce it? I’m thinking about reporting it.

No, I’m not using edge connector pads. I’m using large pads near the board edge and want to max out the available pad space. The pads are large, so it’s not a problem if the board router eats into the copper, but DRC complains about it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.