Custom rules, how to use board edge clearance?

My code is as follows, but it cannot be limited to only one layer, and second, all layers will be set.

(rule edge2cu

   (constraint edge_clearance (min 2mm))
   (condition "A.Layer == 'F.Cu'"))

kicad7.07
win10

I’m trying with 7.99 and there are some problems with edge clearance. I’m not sure how much of them are intentional features (sans the one clear crashing bug which I reported).

You can try “A.existsOnLayer()” instead. Also (layer 'F.Cu') in addition to a non-layer constraint could work. However, I don’t find a way to limit the rule to a layer so that copper features of an item on that layer but not the copper features on other layers wouldn’t be affected. For example, Layer=='F.Cu' doesn’t work for a zone which exists on several layers, and (layer 'x') clause applies the rule to fills on all layers of that zone. The same is probably true for pads.

Maybe @JeffYoung can comment on this.

Is it possible that this is a bug?

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