对于T字形相交,返回想要的点集,判断出交点
private ListxjdIntersection(IPointCollection fnPointCollection, IPointCollection foPointCollection) { List pointList = new List ();//相交的线的的点集 LineIntersection lis = new LineIntersection(); IPoint xjPoint = (IPoint)new PointClass(); Point pointA = new Point(); Point pointB = new Point(); Point pointC = new Point(); Point pointD = new Point(); bool res = false; for (int i = 0; i < fnPointCollection.PointCount - 1; i++) { for (int j = i + 1; j < i + 2; j++) { pointA = (Point)fnPointCollection.get_Point(i); pointB = (Point)fnPointCollection.get_Point(j); int m = 0; for (; m < foPointCollection.PointCount - 1; m++) { for (int n = m + 1; n < m + 2; n++) { pointC = (Point)foPointCollection.get_Point(m); pointD = (Point)foPointCollection.get_Point(n); res = lis.pdIntersection(pointA, pointB, pointC, pointD, ref xjPoint); if (res == true) { pointList.Add(pointA); pointList.Add(pointB); pointList.Add(pointC); pointList.Add(pointD); } } } } } return pointList; }



