rectangle with segment intersection