generative modeling for Rhino
The problem: I want to take an open 3D curve and divide it into fixed length segments, but I want to be able to adjust the positions of the divisions with a slider, and have them wrap back onto the curve if needed, so that the lengths of the divisions is maintained. (There may be odd length segments at the beginning and end of the curve, of course, but the segments in between should be the same fixed length.)
With a closed curve, the analog operation would be adjusting the seam before dividing.
Does anybody have an idea of how to accomplish this? I have a feeling I'm missing something obvious.
I tried just using DivLength, then adding a slider value (0.0-1.0) to the resulting curve parameters. For any parameters that exceeded 1.0, I just subtracted 1 to make them wrap back to the start. (The curve was reparameterized, of course.) But the resulting lengths aren't correct, naturally: parameters don't necessarily correspond to length. I enclosed this first naive attempt in case it's useful.
Thanks for any suggestions.
Tags:
Permalink Reply by Sameer Kumar on July 23, 2012 at 5:52pm Try the Paneling Tools for Grasshopper. It has a component called "Divide Length with Reference" which, I believe, does exactly what you want.
Permalink Reply by Michael Pryor on July 24, 2012 at 8:53am
Permalink Reply by Sameer Kumar on July 24, 2012 at 10:34am
Permalink Reply by Michael Pryor on July 24, 2012 at 11:02am
Permalink Reply by Mateusz Zwierzycki on July 24, 2012 at 11:25am well done !
Permalink Reply by Dave Johnson on July 24, 2012 at 11:10am Thanks, Michael, that's just the push I needed: Of course! Divide the curve in 2 at the parametric "start" point, then use divlength on each of the halves. D'oh!
I took it one step further, like Sameer, and did both halves at once, then took the further step of merging all the resulting points and converting back to a list of parameters on the original curve, see enclosed.
Thanks, both of you!
Permalink Reply by Michael Pryor on July 24, 2012 at 11:54am your welcome, btw the addition of curve closest point is not doing any different then the most recent screenshot I posted. They result in the same format by simply flattening p output of divide length.
Permalink Reply by Dave Johnson on July 25, 2012 at 10:52am I need to end up with t parameters on the original curve, so I used CCP to do that, but I'm sure there are lots of other ways to get there...
Thanks again.
Permalink Reply by Michael Pryor on July 25, 2012 at 11:16am
© 2013 Created by Scott Davidson.
Powered by