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.