There is a serious problem
1.3dm (26.8 KB)
unnamed.gh (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.
Thank you so much!
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.
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.
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
this more closer to rhino analyse direction
curve direction2.gh (7.2 KB)
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!