/// <summary> /// Node the input segment strings once /// and create the split edges between the nodes. /// </summary> /// <param name="segStrings"></param> /// <param name="numInteriorIntersections"></param> private void Node(IList <ISegmentString> segStrings, int[] numInteriorIntersections) { var si = new IntersectionAdder(_li); var noder = new MCIndexNoder(si); noder.ComputeNodes(segStrings); _nodedSegStrings = noder.GetNodedSubstrings(); numInteriorIntersections[0] = si.NumInteriorIntersections; }
private void CheckInteriorIntersections() { /* * MD - It may even be reliable to simply check whether * end segments (of SegmentStrings) have an interior intersection, * since noding should have split any true interior intersections already. */ _isValid = true; _segInt = new InteriorIntersectionFinder(_li); _segInt.FindAllIntersections = FindAllIntersections; MCIndexNoder noder = new MCIndexNoder(_segInt); noder.ComputeNodes(_segStrings); //.ComputeNodes(segStrings); if (_segInt.HasIntersection) { _isValid = false; return; } }