SWEEP One Rail Failed!

Hello all, I have these two perpendicular curves, where each of them has varied parameters.
I’ve been trying to sweep the open one as the “section” on the closed one as the “rail”.
SO the problem is that:
For some values of the parameters, the sweep will give a proper result.
While for some other values, the sweep won’t work at all.

I’ve also attached the script here:

Thanks in advance!

All the inputs work on my end with the exception that the slider on the right should not be able to yield a 0 value for the count or you will fail.

And the slider on the left selecting the geometry to move will result in multiple fails, so that left bit of logic where you list different geometries is your main issue I believe.

Thank you so much for your kind reply!

I understand what you said, but the number sliders you are referring to are already fixed. I didn’t change their values for the sweep to work or not. The only variable parameters here are the three gene pools.

so unfortunately, I’m still not sure where the problem actually is.
But again, thank you!

I see, I have not used Gene Pools in my work so I don’t fully know their nuances but I hope someone else can weigh in!

Try changing the sweep1 to a rail revolve using a z axis line at 0,0,0

Thank you so much!
This actually worked!
Do you know why is that? I mean the logic behind it or something

Thank you very much!

I think sweep rails need to be a bit cleaner in structure/control points in grasshopper.

I tested the curves by baking them in rhino, and the sweeps worked there.

Some of the surfaces, even those that worked inside grasshopper has some weird structure and self-intersections at some locations with some random parameter values.

Not really sure on the cause, but those were my observations.


Thank you for taking the time to look into it!