intersection rectangle with segment