I am trying to separate the list into two lists using the first numbers. That’s mean I would like to have a list from {0;0} to {0;3} and a list from {1;0} to {1;5}. But I have no idea which component is dealing with this problem. Hope to have some advice here. Many thanks!
Let me clarify the problem. I would like to extract the “0” item from the lists as shown in the below picture. No matter how long is the list, just the “0” item from the first and the last list.
I think that instead of trying to solve this issue, and leaving it abstract, tell what you want to solve in your definition. Personally I have never found the need to split lists this way, and that is after about 7+ years of using Grasshopper
Let me clarify the problem. I would like to extract the “0” item from the lists as shown in the below picture. No matter how long is the list, just the “0” item from the first and the last list.
i agree with @Gijs
check the logic of your definition and try to avoid a data-Structure like this.
but i like abstract questions @HS_Kim would you mind adding a few comments on your definition.
i think the most readable approach to complex data-tree filtering is a scripting.
not sure if there is a smarter way to query the highest index at a certain position / sub-branch of a path. i just use a nested loop to do this - so attached script will only work for {A;B}(i) like Trees.
I agree with you. Doing it in C# would be more straight forward to filter a complex data tree. But I am sure that my programming level didn’t reach that part haha.
dear @Baris nice solution regarding a pure grasshopper-component based approach.
not sure if i 100% understand the part:
shift +1
shift -1
smaller then
can you please explain in a few sentences ?
i feel more comfortable with a expression ;-(
(ok which is not 100% components…;-D)
ending up with this alternaive: 20210530_GetPaths_alternative.gh (11.8 KB)