I am running a clash detection between doors and walls. I noticed that in Revit, using the interference check, and in Dynamo, I get clashes between doors and the walls joined to the host or even the host itself. So, I am filtering out the host and joined walls from the results.
My question is: I have two large lists, one with intersecting walls and one with the host and joined wall of each door, both of them are composed by 276 index. I want to check the list of intersecting walls and filter out the walls that are host or joined to the walls. So I am trying to check if there are equal elements inside each sublist. How can I do this? I tried using ==
or String.Contains
with different levels and cross-product lacing, but I haven’t been able to get the correct result.
Try List.Contains
instead. You’re looking for weather each list of strings contains any of the filtered string Ids. You’re not actually comparing the strings themselves in that context.
Thank you for the reply. I have to check the list1 despite the order and so I am trying to check with lacing-cross. I suppose that if I choose level 1 I can do the cross only inside each sub-list but I think I am wrong.. but it seems to me the only way to analyse each sublist individually.
Maybe you could post an example to show the outcome you’re wanting. It’s a little unclear still what you’re expecting.
Sorry, I used only a few indices to check in an easier way what I want to get but I post all the graph. I am trying to do a clash between doors and wall/ I get also the walls that are joined to the host and host themselves of the each door. So I need to filter the list of walls that intersect the doors, avoiding the walls that are host or joined with host. I have on the bottom the list of intersecting walls and on the top the host/joined walls. The two list have the same amount of indices (276) as I expect according to the number of doors. I want to check the first index of the intersecting walls list with the first index of the host/joined walls list, the second index with the second index and so on. In that way if in the intersecting walls list I can filter all the host/joined wall of each door. Because each sublist has more than one element I need to lace as cross product. Using levels I thought I think I can check only each index with the other. But using the cross product each index is check with all the other elements of the other list and in that way I cannot get a correct result.