Esempio n. 1
0
        //public double DistanceTo(CEdge querycedge, bool blnCheckIntersect = true)
        //{
        //if (blnCheckIntersect == true)
        //{
        //    if (this.IsIntersectWith(querycedge))
        //    {
        //        return 0;
        //    }
        //}

        //var dis1 = this.FrCpt.DistanceTo(querycedge);
        //var dis2 = this.ToCpt.DistanceTo(querycedge);
        //var dis3 = querycedge.FrCpt.DistanceTo(this);
        //var dis4 = querycedge.ToCpt.DistanceTo(this);

        //return Math.Min(dis1, Math.Min(dis2, Math.Min(dis3, dis4)));
        //}



        public CIntersection IntersectWith(CEdge pcedge)
        {
            var pIntersection = new CIntersection(this, pcedge);

            pIntersection.DetectIntersection();
            return(pIntersection);
        }
Esempio n. 2
0
        public bool IsIntersectWith(CEdge pcedge,
                                    bool blnTouchBothEnds = false, bool blnTouchEndEdge = false, bool blnOverlap = false)
        {
            var pIntersection = new CIntersection(this, pcedge);

            pIntersection.DetectIntersection();

            return(pIntersection.JudgeIntersect(blnTouchBothEnds, blnTouchEndEdge, blnOverlap));
        }