In Altium Designer, I created a simple rigid-flex board with the 4 layers in the rigid part (top, in1, in2, bottom) and 2 layers in the flexible part (in1, in2).
I set 5mm clearance on a top layer track by means of a simple rule. On the rigid board, the track doesn't have 5mm clearance with respect to the board outline (which is the correct behaviour), but it has 5mm clearance with respect to the split line that divides the rigid part from the flex part.
Said in other words: I can route the track up to the very board border, except when it is a rigid-flex border.
How do I remove the 5mm clearance with respect to the border between the rigid and the flex part?
The error I get is "Celarance contraint between track on TopLayer and PolyRegion on MultiLater":
The net with the problem has class1 class; I set a simple 5mm clearance rule on this class. All other rules are set to Altium defaults:
The only way I found to remove the clearance violation is to set the clearance matrix as in the picture below, but this is not accepable for a standard circuit: