Grasshopper

algorithmic modeling for Rhino

select " if .... then select curve ...."

i have two perpendicular  multi lines " orange lines" and i want choose the maximum of the two line as a list item

i tried to use " function but i failed 

if y>x , choose y, if(x>y,choose x ) as a list item

 

Views: 1351

Replies to This Discussion

  1. Measure the length of all curves in the set from which you want to select the longest.
  2. Sort the lengths and the curves synchronously (ie. plug the lengths into the K input and the curves into the A input).
  3. Use the List Item component with Index=-1 and Wrap=true to select the last curve in the list.

I did ur devise but i failed can u upload a screenshot for ur  steps " choose specific line with specific length " 

i did ur comments but i can't choose the selected items when i press on " list item box " 


Hi Mostafa,

Is this what you are looking for ?

Attachments:

As David said, you can use an index = -1 in the list item component, or you can reverse the K list in the sort list component and keep the index = 0

thanks Sir for ur help , 

is there any tutorials by Arabic " Eng Ibrahim " 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service