示例#1
0
        public bool Overlaps(clsLine3d aLine, double aTol = 0)
        {
            clsLine3d  l1 = default(clsLine3d);
            clsPoint3d p3 = default(clsPoint3d);
            clsPoint3d p4 = default(clsPoint3d);

            if (aTol == 0)
            {
                aTol = mdlGeometry.myTol;
            }
            l1 = aLine.Copy();
            if ((!IsOnLine(l1.P1)) | (!IsOnLine(l1.P2)))
            {
                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))
            {
                return(true);
            }
            if (l1.IsOnShortLine(P1, aTol) | l1.IsOnShortLine(P2, aTol))
            {
                return(true);
            }
            return(false);
        }