示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="candidateSeg"></param>
        /// <returns></returns>
        private bool HasBadOutputIntersection(LineSegment candidateSeg)
        {
            IList querySegs = outputIndex.Query(candidateSeg);

            for (IEnumerator i = querySegs.GetEnumerator(); i.MoveNext();)
            {
                LineSegment querySeg = (LineSegment)i.Current;
                if (HasInteriorIntersection(querySeg, candidateSeg))
                {
                    return(true);
                }
            }
            return(false);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parentLine"></param>
        /// <param name="sectionIndex"></param>
        /// <param name="candidateSeg"></param>
        /// <returns></returns>
        private bool HasBadInputIntersection(TaggedLineString parentLine, int[] sectionIndex, LineSegment candidateSeg)
        {
            IList querySegs = inputIndex.Query(candidateSeg);

            for (IEnumerator i = querySegs.GetEnumerator(); i.MoveNext();)
            {
                TaggedLineSegment querySeg = (TaggedLineSegment)i.Current;
                if (HasInteriorIntersection(querySeg, candidateSeg))
                {
                    if (IsInLineSection(parentLine, sectionIndex, querySeg))
                    {
                        continue;
                    }
                    return(true);
                }
            }
            return(false);
        }