algorithmic modeling for Rhino

Path Mapper Component - what are "placeholders"?

checking out the new path mapper component, I think it's probably really powerful to simplify path remapping operations - could I only figure it out for the life of me!!!

i.e. What are "placeholders", as mentioned in its help file? How do I "define" them, and control them?!

What is the principle behind "lexical operations", and what the relationship between "source" and "target" masks? I cannot penetrate the jargon.. anyone care to explain it in simple terms?

thanks! hugz

Views: 13571

Replies to This Discussion

I am not sure I am the best person to explain the principle behind lexical operations but I have used this component successfully so I will try to explain how I understand it.

Please see the attached image with shows some simple usage of the path mapper.

The points worth noting are the following:

1. The "Source" is comrised of a single line notation which EXACTLY matches the existing path structure. This means that if your parameter viewer shows you a path strcutrure which looks like {0;0;0;1;0} (N=4), your source input should look like {A;B;C;D;E}(i). Here, all the letters A-E and i are placeholders meaning that they can be any letters and are standing by for each digit in your path structure. This also means that they could be any letters: {Q;R;S;T;U}(V) would work as well as {A;X;T;B;S}(J). The important thing is that you are identifying each digit (including the value of 'N', the total items in each path).

2. The "Target" is (obviously) your desired path structure. If you want to simply get rid of the zeros while maintaining essentially the same path structure, it is as simple as dropping out those placeholders while writing the target notation. In the above example, if your source is {Q;R;S;T;U}(V), you can use a targe like {S;T}(V) to return a structure which will be {0;1}(N=4) or {T}(V) for {1}(N=4) and so on.

3. if you want to swap the path structure, i.e. if you have 5 paths with 10 items each and you want 10 paths with 5 items each, you switch the placeholders in the source and target notations. for example, {X;Y}(n) -> {n}(Y)... and so on.

I hope that the above is of some help. Please feel free to keep asking.
thank you so very much, Sameer! at first glance, your image and explanations make a lot more sense than the curt help file. I'll try to experiment with the component based on these descriptions and post a GH definition / (more questions ;) later this week!

well here we go, I tried out some of the stuff mentioned above in a definition.
plug in two curves at the start of the definition to get a diagrid with with a kind of pseudo tent system outline, a bit jittered.. really n00b stuff though, don't expect new formal miracles ;D
make sure to set the max slider values of the md slider to something more than 0.5!! i.e. 10 or so in both axes is fine.

this def is for 6.0043


also included Manuel's path splitter function from:
tho no idea how it does what it does

excellent description. The new PathMapper is actually a bit more forgiving than this though. You no longer need to specify the item index, if you're not using it in the Target mask. Thus:

{A;B;C;D} -> {C;D}

will work fine now.

David Rutten
Poprad, Slovakia
Thanks, David.
And thanks for the tip. PathMapper is an excellent tool and this makes it even better!
Do you always need to go through a param viewer to extract the mapped stuff?
never mind
I'm currently using the path mapper to mimic a list split of sorts but having the split list output as separate branches rather than an A&B.

the source to target masks i'm working on thus far are:

{A}(n) -> {n<(item_count/2)}(n)

which for a source list of n items will output a tree with two branches but the first branch containing n/2 null items + the first n/2 items of a list and the second branch the last n/2 items.

The null items don't really affect anything and can be done away with by a CleanTree, but i wondered if there is an expression which would do what i need.
and what about this?
I really can't understand why it doesn't work: I have 5 planes and 3 surfaces, if I make the brep/plane intersection I obtain 15 lines 3 for each plane.
now I need to remap to have 5 groups of three lines.
but I'm getting crazy.

thanks for help.
graft the surfaces?
One of the most important parts of understanding a tool is knowing when it is appropriate to use, and when it is the path mapper is not necessary...just graft the surfaces.

param viewer: paths=15 - {a;b;c;} - N=1, to obtain 5 groups with 3srf
{a;b;c} -> {c%3}
the problem is that with some geometries you don't obtain the same number of section so my target now is to relate to each plane its sections i.e.:
paths=624 - {0;0;2;0}(N=1)
the number of section planes is 70 and somewhere I have 4 section lines and somewhere 5 or 8, is it clear?
1 plane = 1 set of sections

thank you for helping me.






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2023   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service