Grasshopper

algorithmic modeling for Rhino

how divide a line in segments depends of his lenght

Hi, i want to divide a line in a number of segments depends of his lenght.

I´ll explain. I check for the distance of a line. and i want to divide the line in 1,2 or 3 segments. To decide how many segments it has to divide, the lenght has to be in one of these domain. (0-500)(500-1000)(1000-1500) and then depending  on which domain is the lenght  (1,2 or 3)  this  will be the number of segments to divide de line.

I hope i could explain enough...

How can i do this whit grasshopper.

Thanks a lot for your help. I´m using again grass and its hard to take of the dust

Views: 472

Replies to This Discussion

Hi Enrique, does this work for you? I divided the domains by 10 because my screen is too small to accommodate line of length 1500 ;)

Attachments:

You need to create your length domains as a list of actual domains. Then figure out in which domain a specific line falls, then use the index of the associated domain to find the associated number of subdivisions.

Attachments:

thanks!!!thats exactly what i mean...

thanks David!!

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