Overlap of shapes in layering