Grasshopper

algorithmic modeling for Rhino

Hello everybody,

I'm looking for a way to add numbers in a list according to another list.

I have two lists like the attached file, and I want to do addition with numbers in the list on right (the value list) corresponding to the list on left (the ID list).

Which means something like

S-0: 4.0+1.0=5.0

S-1: 6.0+6.0=12.0

S-3: 7.0+4.0=11.0

            .

            .

            .

S-5: 8.0+5.0=13.0

and I don't want to add numbers with ID "0"

Any help would be appreciated.

Thanks.

Views: 731

Attachments:

Replies to This Discussion

Hi.

What's the purpose of "partition List"?

Anyway, Check attached definition. Best.

Attachments:

thanks alot Hyungsoo!

im working on kind of confidential project and I couldnt upload original gh file.

so i just wanted to reproduce only part of the gh definition that i had problem with and the structure of lists from the original file had branches.. thats all haha

but anyways thanks again!

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