As a background to the script, I am trying to find the intersecting lines between the centerline surface of walls with all vertical surfaces of all OTHER walls.
I have a list of all centerline surfaces that I would like to check for intersections with the list of external vertical surfaces. However, I do not want the Nth surface from the first list to iterate through the Nth sublist of the second one. That would give me redundant intersections as the Nth centerline surface is actually part of the wall that gives me the Nth sublist of surfaces.
You can try and remove those intersections based on index or you can filter them out based on the intersection you get. For example, Wall A intersecting with Wall B will likely return a line where the two planar surfaces intersect. Wall A intersecting with Wall A will return a duplicate of the surface geometry. You can just filter out surfaces to remove the coincidental surfaces. If you have walls that partially overlap in this way, then you can compare the intersecting area with the original area and remove anything that has the same area.
This logic seems to have solved my problem. Instead of trying to modify the initial lists, which has been giving me some trouble, I switched to filtering the resulting intersections with the List.RemoveItemAtIndex list.
Due to how the input lists are organized, I can filter out the Nth sublist in the output (the one which contains all self-intersections).