Merge overlapping/intersecting lines on same plane

I’m not with a computer at the moment so can’t try methods for this but you could try this:

  1. Generate a plane for each line (but vertical not horizontal - i.e. an infinite extension of your extruded planes)
  2. Group your lines by those which share identical planes (note this would be more refined than the previous method to group by same vector)
  3. Get both the start and end points of the lines in each group and organise them in ascending order along the plane
  4. If there are any lines where the start/end points touch, this should create a pair of points which are identical in the list. Extract those pairs from the list to leave only the points which don’t have a ‘twin’
  5. Chop the resulting list into pairs and create lines ‘by start-end point’

Edit: this post may be useful: Planes of lines are - #9 by Ewan_Opie