Grasshopper

algorithmic modeling for Rhino

Hello everybody!! I have a list the one in the left and I want to create a new one like the one the right. Every time that change the number adds 5000. I suppose that i have to use script and i need help with the code.

thanks in advance 

Captura.PNG

Views: 615

Replies to This Discussion

At the very least, you must post your source list.

I do not understand your explanation. Please post picture showing what you want to do.

So the text "1" becomes the text "0" and the text "2A" becomes the text "5000"? You can use a Text Replace component for that.

the thing is that isn't only one change. it has to add 5000 everytime it change so 2b have to 10000 and so on.

I meant post a GH file with your source list internalized.

sorry, this is my first time making a question. I ddin't know that the program what so important. 

Attachments:

Yeah, it's important.

First, the 'Split', 'List Item' and 'Flatten' components are all pointless.

Second, you can internalize your text data like this:

Third, there are duplicate values that appear widely separated in the list; in those cases, is the earlier value re-used?  Or a new +5000 assigned?

Attachments:
Attachments:

Thank you very much!!

sorry to bother again with this issue. Can you explain how works this loop? Because I want to create a similar loop but I dont know how to make it. 

In this loop i want that everytime appears 1 give 5000 and the next numbers adds +2000.

thank you in advance. 

Attachments:

The loop in prueba_2017Oct27b.gh is very simple and self-explanatory, really.  The key is the 'Eval' component and this expression on its 'F' input:

if(txt=prev, p0, p0+p5K)

If it doesn't make sense, you just need to learn more about Anemone and Grasshopper in general.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service