Negative courtyard_clearance does not seem to be working in DRC rules (5.99)

I tried to set courtyard_clearance to a negative number to allow parts to overlap slightly.

(rule partOverlap
   (constraint courtyard_clearance (min -0.1mm)))

However, with this design:

No, DRC errors are being flagged:

Should this work, or is there something I need to do differently?

The courtyard layer can have anything, so it’s impossible to check reliably that courtyards of two footprints overlap only so much.

On the other hand it’s possible to check that the courtyard is a continuous outline. It might be possible to allow partial overlapping for well formed courtyards, but I think it wouldn’t be trivial.

@JeffYoung can comment more.

A valid courtyard is a closed polygon; there is a separate DRC check that will create an error if your courtyard isn’t a closed polygon. So yes, it would in theory be possible to allow testing for a negative courtyard clearance by deflating the polygons (but we don’t do that today)

That’s unlikely to change for 6.0 as there is risk of regressions (unless Jeff thinks otherwise). Currently, a courtyard clearance rule with negative minimum clearance is skipped entirely.

Wouldn’t it be a good idea to somehow flag or log skipped/invalid rules? to at least give some pointers to the user ?

Using a negative value to turn off a clearance check was done intentionally (because we currently have no way to turn checks off entirely in rule-based conditions).

So it’s not actually an invalid rule.

That said, I can see the usefulness of negative courtyard clearances, so I’m not sure what we ought to do about it…

1 Like

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