'Fit' flow curves / brep

Hi Guys, I’m pretty new to grasshopper and am having some trouble with something I assume should be a simple fix. I’m trying to fit a twisted box / brep along a curve using the flow component, but I’m not sure how to make the brep scale accordingly to the length of the curve I’m trying to fit it to. I’ve attached a photo of the initial twisted brep as well as the result I’m getting when I use the flow component, hopefully It should make sense what I’m trying to do. Thanks so much for any help or advice!

*Essentially I want the brep in the second photo to ‘fit’ to the green curve so that it starts and ends at the curve’s start/end points. Thanks

Forum 1

Attach your code.