Grasshopper

algorithmic modeling for Rhino

To whomever can Help!
I have set up a code that pulls a point in space to two curves, (c1) and (c2)
I am trying to set up an either/or situation that if (x) happens, the point is pulled to (c1), or if (y) happens, the point is pulled to (c2)

(x) would be if the distance between the point and an attractor on (c1) is less than the distance between the point and an attractor on (c2), then the point is pulled to (c1)

(y) would be the opposite; the point would be pulled to (c2)

additionally, i am not trying to just pull the point to a curve in an all or nothing manner, i am trying to pull it incrementally based on the distance of that point to an attractor.

is this too complex? i'm close...i think...

Thank you very much to anyone with some sage advice

Brian
















Views: 184

Attachments:

Replies to This Discussion

Assuming you have a hard criteria (boolean) for making the decision, you could use a simple scripted component like this ...


Private Sub RunScript(ByVal f As Object, ByVal Ai As Object, ByVal Bi As Object, ByRef Ao As Object, ByRef Bo As Object)
If f Then
Ao = Ai
Bo = Nothing
Else
Ao = Nothing
Bo = Bi
End If
End Sub


Couple it with components to cull Null values from the list like so ...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service