Tween curve is not working

There is a serious problem :slightly_frowning_face:

1.3dm (26.8 KB) (2.9 KB)

Flip one of your curves. For tween to work the way you expect, both curves have to oriented in the same direction.

1 Like

Thank you so much! :smiley:
P.S. Why Rhino is not required?

Good question. I think in some situations, like Sweep2 also, Rhino is “smarter” than GH and knows “intuitively” what you want. Sweep2 also depends on curve orientation. Maybe someone who is familiar with RhinoCommon etc. can explain what’s happening in the background.

Generally spoken, the difference between a Rhino command and Rhinocommon functionality (used by GH) is that RC only provides basic, sometimes reduced and often very encapsulated (single responsible) functionality. This is better for using it in own commands/algorithms. If you however want to automate a manual modelling approach, calling the command would be better (which sadly is not easy to do)

That said, creating curves between two curves is one task, where arranging them right is another task. Maybe there are even situations where flipped tween curves are wanted. Who knows…

I think to arange curves automatically, the command does some sort of „close to parallel check“ with the curve tangents, to evaluate if one curve needs to be flipped or not (evaluating the dot product of both vectors). Another way to check is evaluating the curve length of the tweens and check if they are much shorter than their parent curves.

However, best is to always be aware of curve/surface directions in Grasshopper.


Thanks Tom. Sweep2 in GH is particularly annoying. Sometimes, you luck out and everything works out the first time. I used to bake the curves to see their orientation in Rhino when thing went awry but now use the Curve Direction component in Wombat that displays arrows on the GH curves. It also has a Surface uv direction component.

1 Like

I prefer the gh “deconstructed” way. The user should be aware of the tools they are using. Sometimes I like that crossed over look for a pattern and if you start making methods to auto “align” then you actually loose functionality and are forced into one type of outcome. Also curve matching has no one specific solution, you should build matching based on the specific situation.

That being said, you can use the gh flip curve component with one of the curves as the guide input.


I wrote an own component to show them.

But for curves its extremely simple to do with native GH:


You do have a point about it being easy to do in native GH. Guess I’m just too lazy to cobble together the three components needed.


to be fair, it could be a boolean to align directions or not, but on the developer end it is more of a hassle than anything because there will always be cases it won’t work - same cases that flip curve with guide doesn’t work, and then you get complaints that it doesnt magically always know what your intent is. At least that is why in Pufferfish I don’t add an option like that to the tweens.


flip curve have guide option
if you have many curves choose one of them as guide

1 Like

this more closer to rhino analyse direction
curve (7.2 KB)

1 Like

As i did

And after some use of GH, I think it is sometimes blunt (when compared with Rhino).

This is an example of something that PERHAPS would be nicely solved - and perhaps other functions with multiple outcomes - by having the command create [ok I’ll say it] ALL the possible options for the command and having a popup that allows you to pick the one or one"s" the user wishes to keep, discarding the rest. Obviously, it would be nice if the popup check/selection box would color them differently until the one[s] picked are finalized with the old ‘ok’ or ‘apply’ button.

This may be too complicated, but it would be nice…other commands also…in place of having to back out and do it over, and over, and over…

But that may not work, may not be practical for everything yet select [some] commands it would be nice.

And yes, I can not do it or script it, I do not have that kind of talent, which is why it would REALLY be nice!

1 Like