I need to remove one curve from a list, thanks for helping,
Roy
remove a curve from a list.gh (4.0 KB)
I need to remove one curve from a list, thanks for helping,
Roy
remove a curve from a list.gh (4.0 KB)
@lopez the solution you posted only works because the curve you’re trying to remove is the last item in the list (the list is being shifted -1 without wrapping).
If you examine the output of the Item Index component, you will see that it is (-1). This means the item could not be found. The Item Index component is looking for items with matching memory addresses, it does not compare any characteristics of the items being searched for.
Also, if the Shift List has removed any items from the list, the Wrap (W) input parameter has been changed from it’s default value of True to False. As you have only posted a screenshot, it is impossible to tell what the internalized value of this parameter is.
-Kevin
You can delete the matching curve by comparing midpoints. This works with your example geometry. It’s possible that if curves were crossing they could share a midpoint. In that case more comparisons would be necessary (start/end points, length, etc…).
remove a curve from a list_re02.gh (6.1 KB)
-Kevin
Hi Kevin,
I understand,
Thanks a lot for your reply,
Roy