To find triangles use:

VERTEX L1 ==3

Find small triangles:

VARIABLE one_db 1 / $PRECISION

VARIABLE small 0.001

SMALL_L1_triangles {

Tri = VERTEX L1 ==3

Se = LENGTH Tri <= small // small edges on a triangle

Tri WITH EDGE Se

}

Alternately if more criteria were needed then the check can be done using DFM PROPERTY:

PROP_SMALL_L1_triangles { @ triangle with at least one small edge.

Tri = VERTEX L1 == 3

Se = LENGTH Tri <= small

DFM PROPERTY Tri Se OVERLAP ABUT ALSO

[ L = MIN(LENGTH(Se)) ] <= small

}

Exclude small triangles from XOR results:

VARIABLE one_db 1 / $PRECISION

VARIABLE small 0.001

XOR_L1_L2_triangle_filter { @ XOR L1 L2 without small triangles

A = L1 XOR L2

Tri = VERTEX A == 3

Se = LENGTH Tri <= small // small edges on a triangle

Tri NOT WITH EDGE Se

}

Note that those rules can not be used directly with Fast XOR. They could be used as part of a DRC run to filter the Fast XOR results.