Applying a pattern into a curve

Hi everyone! I am a student who is currently self-learning grasshopper.

So I have made this pattern which is a constant S shape wall with bricks stacking on it. However, I would like to apply this “pattern” onto another curve (so basically loads of S turns). May I ask how should I do so?

Attached here are my grasshopper and rhino files ._.

Please kindly explain to me on which step I could have done better. My main confusion lies in how should I make it into a pattern instead of a preformed structure?

Pattern and curve.7z (43.6 KB)

Thanks so much!!!

Brick walls typically use a surface as their basis, not just one curve. You can replace the two curves you are lofting now to get your surface with the new pattern curve and a copy of it, moved up in ‘Z’. (15.8 KB)

There are problems with your code, though… You might want to look at this: