You didn’t internalize your curve. Given a curve of the right size and shape, your code seems to work well enough?
Seems to me that I’ve done this sort of thing many times on this forum but can’t seem to find them now… Found this from 8.5 years ago using nested Anemone loops. Cool but different:
RecursiveBrick_2016_Jan2b.gh (25.2 KB)
And this one, which is something very different but also uses Anemone:
Too lazy to do it again today, sorry.