algorithmic modeling for Rhino
hi,
i'm having a problem with a loft in grasshopper
i'm using grasshopper-generated control curves. the list is in a correct order, but it seems the curves have varying directions (or at least i think that might be the reason why the loft is messed up).
it's weird though, because when i bake the control curves and loft them in rhino, the result looks fine without any adjustments to the curves or the loft.
i'm attaching screenshots and source files. please, let me know if you have any idea
thanks!
Tags:
Indeed, Rhino Loft automatically adjusts curve directions. you can use the Flip Curve component with a guide curve. If that doesn't work, I'm out of ideas.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
thanks, david
i realized what the troubble is, however i don't know why the curves are flipped randomly in the first place. they all are creatied as an interseciton of a single brep and a set of parallel planes.
i'm working on a very difficult workaround now, but i'm sure it will be possible to simplify it eventually.
ok, i've got a solution. it's messy and i'm sure it's possible to make it more simple, but all my other attempts failed. note that my control curves are planar and parallel to the XY plane. the main idea is to distinguish the direction of the loft control curves - it's either clockwise or counterclockwise. therefore i found geometrical centers of the control curves and two consecutive points on the curves. then i draw lines from thecenter to thefirst curve point and from the first to the second curve point - let's call them L shapes. the shapes show the direction of the curve's rotation. then i aligned all the L shapes by their first segments and check whetherthe second segments point to the left or to the right. this makes a pattern for flipping the wrong control curves.
the solution in steps, maybe might help someone in the future :
my grasshopper definition is very untidy, so i won't attach it, but this is pretty much the idea.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by