I went a bit wrong way with the rectangle (your shape isn't rectangle) so this doesn't overlay that well with it (I also guessed the corner points).
![jthi_6-1723745398848.png jthi_6-1723745398848.png](/t5/image/serverpage/image-id/67178iF9EE8C8A4A5362BA/image-size/large?v=v2&px=999)
So I found other function and modified that for JMP. It is closer but it is still using hard-coded corner points
![jthi_7-1723745898887.png jthi_7-1723745898887.png](/t5/image/serverpage/image-id/67179i831030F04CF89324/image-size/large?v=v2&px=999)
![jthi_8-1723746004999.png jthi_8-1723746004999.png](/t5/image/serverpage/image-id/67180i25CB469252096387/image-size/medium?v=v2&px=400)
-Jarmo