Path mapper possible glitch

Hi,

I’m using the Path mapper to restore the proper tree structure between a “Sift” and a “Combine” component, but it only succeeds in creating nulls if the empty branch is at the start.
Hard to explain, so I made a capture and attached the snippet.

Path mapper fail.gh (43.5 KB)

@DavidRutten : See ? I’m trying to use what I learned in Barcelona :slight_smile:

OK, I found a workaround, but damn, the day had started so well…

I just wanted to offset “some” of the curves in my lists and rebuild lists with the same structure containing the “not offset” AND “offset” curves. Nothing too fancy…
Well, the “Offset Curve” component outputs empty branches instead of “Nulls” so I was forced to jump through hoops to re-format my “offset” curves tree.
…or was I ?

Flaming hoops.gh (55.3 KB)

Hello ?

What’s wrong with the Path Mapper here ?
Bug or feature ?

I have another issue ; I have a custom list re-ordering to do and thought I’d go with the Graph Mapper.
Well, it doesn’t work :

I know that it just requires a “List item” component to do this, but I’m curious why the graph mapper refuses to do anything here…

First picture:
I think you can use trim mapping for this. {A;B} -> {A} (or right click on graph mapper)

Third picture:
Can’t test it atm, but what I see from your screenshot is that you use square brackets for item 0,1 etc. I think it’s round brackets.

Ahhhh ! the brackets… For indexes, it’s supposed to be square brackets
Anyway, round brackets just output multiple times the same item, so that doesn’t work either.

Nope. Trim screws up my tree by ignoring the null items which I need as placeholders.

I’m on RH5 atm. It works:

Also if I don’t graft 0 output of sift pattern and use another partition list instead (more than one item in every branch)

Sorry, I expressed it wrong : the problem is that the Path Mapper sqweezes the empty branches when in fact I want them to translate to a null item, which is what my previous image shows, actually.

Ok sorry, missed the part that curve offset creates an empty branch, no null item.
But I think it’s no strange behavior. What do you want to add to the new list after path mapper if there’s nothing to add. So in my opionion it works correct.

But to simplify the mess (as you called it) here’s a 4 lines python code to add an “empty” into empty branches. Should work with path mapper May you like it :slight_smile:

EmptyBranches.gh (1.9 KB)

Tim, I need the null items as placeholders for the "Combine component to produce the proper output further down.
Thanks for your python script.

I really get pissed off by those silly issues with the subtleties between “empty”, “Null”, “No data”, “Nada”, “Void”, etc…
Reminds me of the dead parrot sketch.

Yeah I know that you need it. But I think the logic of graph mapper is correct in this case.
In my opinion curve offset should create null items instead of empty branches, but that’s another endless discussion without a solution. Sometimes it’s may usefull sometimes not. May create an user obejct out of the python script and in the future you have a simple one component solution :slight_smile:

Tim, look more closely at my very first image in the initial post.
You will see that the Path Mapper does NOT behave in a consistent manner :
Empty branch {0;0} translates to a null item whereas empty branch {1;2} does not.

@DavidRutten
David, could you look into this ? To me, this is clearly a Path Mapper bug.

Ahem.

Logged under RH-51447.

I’m still trying to decide whether changing the behaviour would be too disruptive.

The reason the nulls are inconsistent is that all empty branches are ignored, but nulls will be inserted in front of an item if the mapper says it should be at index N.