Wall locating curved and diagonal elements in grids

Good friends … you will see I have a problem when locating diagonal and curved elements in relation to the grids … I am very beginner and I do not know how to start the script … I will be very grateful if you can help me … thanks.