I guess I should use as few variables as possible, I suppose no one would name their paths "Helper" ;) This macro assumes the argument is clockwise, I've written a macro to find out whether a path is clockwise or not, but it took me forever to run the code. Maybe there's already some primitive could do this. \startMPinclusions def getridof(expr p) = save Helper, Oringin, Mode, MagicPoint ; pair Oringin ; Oringin := center p ; pair MagicPoint ; numeric Mode ; Mode := 0 ; path Helper[] ; Helper0 := p ; Helper1 := llcorner currentpicture -- lrcorner currentpicture ; Helper2 := lrcorner currentpicture -- urcorner currentpicture ; Helper3 := urcorner currentpicture -- ulcorner currentpicture ; Helper4 := ulcorner currentpicture -- llcorner currentpicture ; for i=1 upto 4 : Helper[i+4] := Helper[i] ; endfor Helper11 := llcorner currentpicture -- Oringin ; Helper12 := lrcorner currentpicture -- Oringin ; Helper13 := urcorner currentpicture -- Oringin ; Helper14 := ulcorner currentpicture -- Oringin ; if (((llcorner currentpicture -- Oringin) intersectiontimes p) = (-1,-1)) : if (((lrcorner currentpicture -- Oringin) intersectiontimes p) = (-1,-1)) : if (((urcorner currentpicture -- Oringin) intersectiontimes p) = (-1,-1)) : Mode := 4 ; else : Mode := 3 ; fi else : Mode := 2 ; fi else : Mode := 1 ; fi Helper100 = Helper[10+Mode] cutafter p ; MagicPoint = point length(Helper100) of Helper100 ; Helper0 := Helper[Mode] for i=1 upto 3 : -- Helper[Mode+i] endfor -- Helper100 -- (Helper0 cutbefore MagicPoint) -- (Helper0 cutafter MagicPoint) -- (reverse Helper100) -- cycle ; clip currentpicture to Helper0 ; draw Helper0 withcolor cyan ; enddef ; \stopMPinclusions