Align object on to surface normal

Hi,
could u guys plz tell me how to align these object orientations on to normal surface?. I’m stucked with it


for sbarch.gh (130.1 KB)

You need to calculate the normal of the surface on the points where you want to insert the blocks.

Orient_on_Surface.gh (231.5 KB)

Thank you for ur help