Grasshopper

algorithmic modeling for Rhino

Hello

I have a booelan list but I would need to add 1 value in the list every time the value 1 is there resulting in a longer list, I show below an example:

Does anybody have an idea?

Thanks

Amedeo

Views: 570

Replies to This Discussion

Hi Amedeo,

This seems to work. I assumed that if the initial '1's are contiguous, you still want to expand them.

Attachments:

Ethan that is great Thanks a lot!!

Hi everybody, This is a similar Problem i encountered today, it might sound easy to you but  I am quite new to data management.

I have 2 lists and I would like to use the first as pattern for mass addition:

for example the I would like to have as result of the table below

2.43..+1.9..+0.04 = first number of a new list

1.37+0.005+1.53+1.43 = second number ecc

Do you have any idea?

Thanks

 

Attachments:

This is great Thanks a lot David!

Good Morning I am still encountering a similar problems

I have a 2 list as showed here but the disered output is to have a 3rd list with "null" elements instead of duplication, so in the 3rd panel i would like to have at number  3= 0.73  4= null 5= null 

Do you have any idea? thanks a lot

Attachments:

You could use the "Replace Item" component, with the replacement indices defined as such:

Where the expression in the "Series Component" = x-1.

(I've just used the first series to create two number lists, these would be your lists as per your image above...)

Attachments:

Thanks a lot!

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