Brick the forme of braid X_Y

Hello,

I’m making a braid-shaped brick wall, but the Z-axis Baez curve can’t be generated, I picked the first and last two endpoints and the curve, but the order of the data I don’t know how to solve it, if I use a curve to affect the change of the Z-axis, how should I do it?
Welcome your message to help me, thank you very much!

brick the forme of braid X_Y.gh (42.3 KB)