I am trying to find the intersecting point between two lines that cross over each other, like a cross. I have tried the .intersectswith method but it seems to only find a point where one line begins or ends on the other line. Below is the code I am using.
Code:
Private Function LinesIntersect(line1 As Line, line2 As Line) As Nullable(Of Point3d) 'As Tuple(Of Point3d, String) 'Nullable(Of Point3d)
'Try
Dim ls1 As New LineSegment3d(line1.StartPoint, line1.EndPoint)
Dim ls2 As New LineSegment3d(line2.StartPoint, line2.EndPoint)
Dim inters As Point3d()
Dim colI As New Point3dCollection
Dim x As Boolean = False
inters = ls1.IntersectWith(ls2)
If IsNothing(inters) = True Then
MsgBox("****")
inters = ls2.IntersectWith(ls1)
If IsNothing(inters) = True Then
MsgBox("**** 2")
Exit Function
End If
End If
end function