Insert elements back at the same index

Trying to the reverse curves back at the original index of a list. But the index return is -1. Did it first with curves. Result is index of -1.

Second with strings.

Result is still -1. Any help?

Not sure, if i am right about this. But you reversed your curves so aren’t you trying compare A with B instead A with A? In others words you trying to find indices of items that don’t exist (but i would expect nulls then though.

Also, i believe the order of the List doesn’t change after reversing your Curve.

So what you asking is not needed or maybe i am missing something?

Bit hard to see what might goes wrong without seeing the whole graph or what you goal is / knowing your workflow.

I have a list of lines from a boundary from faces. But some of them are reversed.So with filter boolean mask I filter the reversed line and reverse them. Then I want to replace the reversed lines back in the list of lines.

Example

List =

0|A

1|B reversed

2|C

Element that’s is reverse is B. So I reverse the line and want to replace 1|B with the reversed B. the new list will be.

List =

0|A

1|B

2|C

Not sure if this would work?

Or maybe this?

1 Like

@s.boschPE29N

Did you get a solution?

@bvs1982 is correct here - a reversed curve is not equal to the original curve, so the solution is to use an If node instead of the List.FilterByBoolMask. Note the list levels will have to be adjusted to get the interleaving.