Esempio n. 1
0
        public bool Overlaps(clsLine aLine, double aTol = 0)
        {
            clsLine  l1 = default(clsLine);
            clsPoint p3 = default(clsPoint);
            clsPoint p4 = default(clsPoint);

            if (aTol == 0)
            {
                aTol = mdlGeometry.myTol;
            }
            l1 = aLine.Copy();
            if ((!IsOnLine(l1.P1, aTol)) | (!IsOnLine(l1.P2, aTol)))
            {
                return(false);
            }
            if (Dot(l1) < 0)
            {
                l1.Reverse();
            }
            p3 = l1.P1;
            p4 = l1.P2;
            if (P1 == p3)
            {
                return(true);
            }
            if (P1 == p4 | P2 == p3)
            {
                return(false);
            }
            if (IsOnShortLine(p4, aTol))
            {
                return(true);
            }
            if (l1.IsOnShortLine(P1, aTol) | l1.IsOnShortLine(P2, aTol))
            {
                return(true);
            }
            return(false);
        }