I’m struggling with what I suspect is a really easy fix, and I’ve done a search on old posts, but didn’t find anything.
I have a series of points on a line (that I can keep on the line, thanks to the “on curve” command). They are free to slide anywhere on the line, but I want to maintain the order. I don’t want them to slide past each other. Is there a way to add this constraint?
Using equal “Length(Line)” or a weak “Anchor” maintains the order, but constrains the movement of the points too much, restricting their sliding. I want complete free sliding movement on the curve as long as the order does not change.
I could see there being a “chain” command or some other goal that I’m missing. Or is there a way to use curve parameters and set a goal that the curve parameter of each point must be greater than the next point in the sequence (pure math goals)? Any thoughts out there? @DanielPiker?
You can sometimes do this with SphereCollide if you want to keep some minimum spacing, but this doesn’t always prevent crossover if the points move too quickly. For that you need something that compares curve parameters between consecutive points.
I did actually already make a goal for this, when I was trying some stuff for making developable lofts, but am not sure I ever posted it before, so here it is:
OrderedOnCurve.gh (13.0 KB)
You’ll need to set the referenced assembly location to the copy of KangarooSolver.dll on your computer, which if you are using Rhino 6 should be:
C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Components
or if you are using Rhino 5:
C:\Users\ YourUserName \AppData\Roaming\Grasshopper\Libraries
This is perfect, thank you. I plugged it directly into my scrip, solved the problem right away.
Ironically, I am working on developable strips as well. This reduced the Gaussian curvature/error in the unroll such that the “area difference is within tolerance.”