/// <summary>
        ///
        /// </summary>
        /// <param name="candidateSeg"></param>
        /// <returns></returns>
        private bool HasBadOutputIntersection(LineSegment candidateSeg)
        {
            IList <LineSegment> querySegs = _outputIndex.Query(candidateSeg);

            foreach (LineSegment querySeg in querySegs)
            {
                if (HasInteriorIntersection(querySeg, candidateSeg))
                {
                    return(true);
                }
            }
            return(false);
        }
        /// <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 <LineSegment> querySegs = _inputIndex.Query(candidateSeg);

            foreach (TaggedLineSegment querySeg in querySegs)
            {
                if (HasInteriorIntersection(querySeg, candidateSeg))
                {
                    if (IsInLineSection(parentLine, sectionIndex, querySeg))
                    {
                        continue;
                    }
                    return(true);
                }
            }
            return(false);
        }