コード例 #1
0
        ///<summary>
        /// Creates an intersection finder which finds all interior intersections.
        /// The intersections are recorded for later inspection.
        ///</summary>
        /// <param name="li">A line intersector.</param>
        /// <returns>a intersection finder which finds all interior intersections.</returns>
        public static InteriorIntersectionFinder CreateAllIntersectionsFinder(LineIntersector li)
        {
            InteriorIntersectionFinder finder = new InteriorIntersectionFinder(li);

            finder.FindAllIntersections = true;
            return(finder);
        }
コード例 #2
0
        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;
            }
        }