Remove list from list for curve

Does anyone know how to remove a list from another list for curves?
The List.SetDifference node seems only fit for numbers and points, but it does not work for curves.
Thanks a lot.

Try this

Capture

Py Script by @Nick_Boyts can be found here
https://forum.dynamobim.com/t/help-remove-duplicates-accross-list-of-list/38212/10

1 Like

Thank you for your help. Your code work perfectly with numbers but it does not work for lines or curves. Is there any ways could be done for curves?

Hi @htmokac @AmolShah

Here is another possible way:

OUT = sorted(set(IN[1]) - set(IN[0]))

Edit: Yes i noticed the same Line gives 1st List. Iā€™m away now from my PC. I will get back to this soon.

2 Likes

This one works for all types:

OUT = IN[0][len(IN[1]):]

2 Likes

Thanks. However, it seems not working if 2 lists are not start with the same point.

It does not work as well if the list is in different orders.

@htmokac Are you looking for this?

1 Like

@Kulkul that exactly what I looking for. May I know how can you do it?

@htmokac convert to strings -> Check if IN[0] is equal to IN[1] which will give you booleans -> Filter false.

1 Like

@Kulkul Thanks again. I have tried what you suggested. However the output will change to strings instead of lines/ curves. Further operations, like forming walls, are not allowed.

@htmokac Could you drop here your python code?

@Kulkul
OUT = set(IN[0]) - set(IN[1])

@Kulkul It works by using your flow. Thank you very much.