Bend polyline progressively with slider

Ahoy to all the sailors in this Grasshopper Ocean!

I´m currently struggling with the task of ’ progressively bending’ a polyline

Basically I want to move a slider and bend the polyline like the image. I currently have a definition that does the task but in a very ‘artisanal’ way… if I change the number of points that form the polyline the script breaks because you’ll have to copy one part of the definition below to solve the ‘addition problem’ and reconnect everything. I looking on ways to optimize this technique of bending.

GH>> BEND.gh (25.0 KB)

Best Regards,
Sir Ernest Shackleton

Maybe this help you

polyline.gh (16.1 KB)

1 Like

Your model was way too complex for me to follow.

My first effort (purple group below, polyline on the left) is not the droid you’re looking for…

The second attempt (white group, polyline on the right) uses Anemone and is better since all the segments are equal length, as I intended.


bend_polyline_2019Oct1a.gh (25.7 KB)

If your polyline input has arbitrary length segments(?), it won’t do either, but the Anemone group could be adapted rather easily by replacing the ‘Length’ slider with a list of polyline segment lengths.

2 Likes

Beautiful approach, Joseph.
Thanks,

Best regards,
Ernest Shackleton

bend-polyline-progressively-with-slider.gh (10.2 KB) Here a version reading a polyline, but could be also a curve on XY plane

2 Likes

I like this one much better. The white group (“bend it”) at the bottom does the heavy lifting with Anemone. It has two geometry inputs: 1) a polyline and 2) a rotation plane (‘rot_plane’). The ‘angle’ slider sets the rotation angle that applies to all segments.

The first three groups are optional:

  1. ‘Consruction Plane’ (light blue) with Azimuth and Altitude sliders.
  2. ‘line’ (purple) that sets the origin and total length of a line.
  3. ‘polyline’ (yellow) with a ‘Count’ slider to set the number of segments and a Value List switch to choose between “Even” (all segments the same length) or “Random” length segments.


bend_polyline_2019Oct2b.gh (28.7 KB)
bend_polyline_2019Oct2b2

Much better! Cheers

1 Like