Grasshopper

algorithmic modeling for Rhino

Hi Everybody..

 

I'm stucked in0 a problem that I believe it should be easy to solve. I've just simplfied it in a Rhino and a grashopper file. The proble is this: 

 

I have a drawing with a some points (i. e. 5) and circles (i. e. 3). I find the closest points from the given point to the circles and I draw the lines between those (so I hace 15 points, 3 for each point). What I need now is to Grasshopper to select the longest (or the shortest) of each three lines.

 

Any sugestions..

 

(attahfed you'll see the Rhino file)

 

Thanks a lot fellows. Any help I'll apprreciate a lot.

Views: 7710

Attachments:

Replies to This Discussion

  • Curves (Your lines)
  • Length
  • Sort List (Attach your lines to grip "A")
  • Reverse list (to get the longest first instead of last)
  • List Item (Get the first item, "i" set to "0")
  • Resulting curve is the longest

I hope this helps.

thanks!

Thanks a lot Marten.. Really clever.. (And I need to keep practicing). I didn't know to use that "syncrhonous element" in sorting a list. While I was trying to solve the problem by myself I found another problem. I'll post it as another discussion. I'll be thankful again If you can have a look to it.

In fact you don't need Reverse, if you set the W input of the List Item to true (should be the default in new versions of GH), then the [i] index can be -1 and you'll automatically select the last item in a list.

--

David Rutten

david@mcneel.com

OK.. let me try... (and.. WOW.. thanks a lot for keeping track.. )

yes. i had an error with reverse component...

thanks a lot!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service