Grasshopper

algorithmic modeling for Rhino

Hi everybody!

Is there a possibility to convert numbers within a string (for ex. numbers of branch index) to integer numbers. I want to get the number of each branch in a tree as integers in a list. Is there any possibility to solve this problem? Thanks in advance!

David

Views: 5287

Replies to This Discussion

try the "Decompose Branch" component for the case of paths... for other cases you can use "Split String" as long as you know the possible non-numeric characters (like '{' and ';' and '}') that might occur. If this gives you empty strings just pass the values through an int (or other numerical) data type parameter; even though it will turn red it will pass the number values through fine and get rid of the empties.

Great! It works! Thanks a lot!

I do not find these components

try this

Strings have been renamed to Text in later grasshopper version. Split String = Text Split etc.

cheers

alex

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service