a shape A inside another shape B (A can be totally inside B, or may intersect B):
Inside B , all ("outside") edges of A must have a min. distance (=spacing) to B's ("inside") edges (not where they are intersecting of course, if so, but to opposing ("inside") edges of B).
Thanks erikl for the reply
I am just curious to know which scenario causes this.Whether Metal1 and Metal2 overlap(without a via in between) is an example?
A good example of "A enclosure of B" would be with a poly1-poly2 capacitor. The edges of poly1 would have to overlap the edges of poly2 by a specified amount. You also make a capacitor in this manner with metal1 and metal2.
That may be true for some specific / special case, but I have
seen compound rules like "N+ extension of poly in direction
of gate" - intent being to force an overlap that exceeds
the litho tolerances, where you want full uniform coverage
of something by something-else.
In fact, shapes on the same layer merge, so I think the
extension rule is not meaningful for same-layer polygons.