Sweeping multiple profiles seems to roate 90 degrees on certain curves. How to keep same orientation?

0456_Sweep Multiple Curvs From Profile.gh (8.9 KB)

Hi there,
I’ve built a blended surface and projected lines onto it in a varying grid pattern and want to sweep different profiles across them.
I’ve built the script and the sweep works on some of them, but seems to randomly rotate others.
I’ve tried flipping Dir etc, rebuilding the surface etc but to no avail.
I’m fairly new so help would be appreciated.

Thanks in advance!

no geometry is internalized and could not find the surface too
0456_Sweep Multiple Curvs From Profile_re.gh (8.1 KB)

Sweep Multiple Rails - Geometry.3dm (493.4 KB)

Thank you so much for taking the time to reply.
Ah sorry I didn’t attach. I’ve attached now!

Could you please have a look at that?

I’m testing with a regular rectangular profile just for the script to run, but I will likely want to draw a very different shape and run that which won’t need to be generated from grasshopper like you have done.

Am rhino 5 user (the Rhino file is higher version )
so could you internalized the geometry in grasshopper

Ah sorry! Here you go…hopefully done it the right way.
Thank you so much.

0456_Sweep Multiple Curvs From Profile_Inernalized Data.gh (289.6 KB)

u might want it

0456_Sweep Multiple Curvs From Profile_Inernalized Data RE.gh (41.1 KB)


Sweep_2020Dec13a.gh (296.7 KB)

2 Likes

Update

That’s so much better thank you so much!

I rebuilt from your photo…seemed to work in the preview but it also threw out a few errors…should I be concerned?
Some of the lines were still reversed so I manually flipped them and also seemed like one of the lines wouldn’t sweep.

Think I can work with this but let me know if you have any other thoughts!!
Thanks again!

Ahhh that seems to work perfectly…Thank you so so much!

Coping with arbitrary and inconsistent curve direction (start/end points) can get complicated. It’s much better to create curves with consistent direction in the first place.

2 Likes

i like the solution but i wonder how it works

It just barely works, comparing Z values of start/end points to choose either the original rail curve or a flipped copy of it. Complicating things further is the fact that some of these rails near the middle have vertical ends which result in horizontal pFrames that may not be affected by Align Plane with a Z vector ‘D’ input. Honestly, it was trial and error and is probably fragile, easily broken by slight changes to the geometry.

2 Likes