Grasshopper

algorithmic modeling for Rhino

Sorry for this basic question, but somehow I'm not getting this to work.
I have a list of 2500 numbers and would like to reduce this down to 2000. I tried random reduce by putting the list into L and typing 2000 into R, but it still outputs a list of 2500. Same problem when I try to do a sublist. Where am I going wrong. It's not so critical how it gets reduced to 2000 (whether randomly or straight forward chopping the list down) so I'm open to any method.

Thanks

Views: 2207

Replies to This Discussion

I'm sorry but I cannot replicate this. What version of GH are you using?

This might sound patronising but I don't mean to offend. Has the list been reduced in number but is still showing the last value?

Here are my results for v0.7:

Thanks for your reply Danny. Not patronizing at all.. I realize this is a basic question.

I was trying the random reduce and sublist just as you've shown and it works when I put in a generic series of numbers as you have, so now I'm realizing the issue must be with my original list. I've attached a screenshot showing some of the numbers of the original list I'm trying to reduce.

Basically, I'm taking the z points from a list of original points manipulating them and then using those to create a new set of points.


Thanks again for your help.
Technically you do not have a list of 2500 points there. What you have is a list of 2500 lists of one point. Therefore you are trying to reduce 2500 single points and probably getting 2500 null values. The easiest way to solve this is to flatten the input into the reduce/sub list component with either a flatten component or from the inputs context menu. If, however , you mess up the data structure too much then the alternative is to use the Path Mapper component and collapse the individual branches to the one above. {A;B;C;D;E:F}(i) --> {A;B;C;D} for your particular case as seen above.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service