How can I create a zone fill inside a zone keepout area?

I want to create a rule area that is a keepout for some zones but not others.

More specifically, I have a rule area intended to keep out zone fills connected to the “GND” net and I would like to add a zone fill inside this rule area that is connected to the “SHIELD” net. I have attempted to accomplish this with custom rules but have not had success. For example:

(rule “allow shield fill”
(condition “A.intersectsArea(‘keepout_area’) && A.Name==‘shield_fill’”)
(constraint clearance (min 0.1mm))
)

Any help would be greatly appreciated,
Thanks!

If distance between inner zone and outer made by clearance is not enough good for you than I think keep out zone should have a shape of moat around inner zone, but I have never tried it.
I remember asking (not sure if only at forum, or may be by feature request) to make it possible for margin layer objects be working only at specified copper layers set.

Your example rule makes any item which intersects the area have a clearance of min0.1mm with any other item.

No matter how hard I try, I can’t find a way to do what you want with a rule area.

You can already affect specific copper fills in combination with the Margin layer. But that’s not enough in general case if you want to disallow only fills; I can’t get the same working with tracks so that I could ignore the clearance for interactive track routing.

The rule for a specific zone is for example this:

(condition "A.Type == 'Zone' && A.NetName == '+12V' && B.Layer=='Margin'")
(constraint edge_clearance(min -1mm))

Is there consensus that it is not possible to create a custom rule that is able to override a rule area zone keepout?