Grasshopper

algorithmic modeling for Rhino

This is my first question in the forum so I hope I do this right, I am trying to use the Path Mapper to add a range of integers to the beginning of every branch path I have, for instance if I have branches {A} id like to add a path at the beginning that is an integer from 0 to 3 to produce {0;A} & {1;A} & {2;A} & {3;A} but instead of the way I wrote it as shown in the image below id like to know the lexical way to write this in one go...also, is there a way to make my range of integers parametric? for instance i'd like a range of values from 0 to X where X can be linked to a slider or the parameter of another component, I hope my question is clear

Views: 643

Attachments:

Replies to This Discussion

I'm not sure the Path Mapper is the tool for this. In this very particular case you can write:

{A} -> {path_index;A}

But any other sort of dynamic prefixing may exhaust the path mapper algorithm. You may have to decompose existing paths and then recreate them with some added numbers.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you for the reply David perhaps I could upload the entire script I'm trying to do another time to make my question clearer, but the range of integers is not related to the path_index, is there a way to just say from 0 to 3 instead of path_index? I tried {[0-3];A} but that apparently doesnt make sense to the Path Mapper

Maybe upload the file, of post two lists of paths, what you have on the left, what you need on the right.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service