Example #1
0
        public static void ShowEdgeRelationshipAroundCpt(CPoint cpt)
        {
            CEdge IncidentCEdge = cpt.IncidentCEdge;
            CEdge currentcedge  = IncidentCEdge;

            Console.WriteLine("-------------------------------start Around Cpt------------------------------");
            do
            {
                CDCEL.ShowEdgeRelationship(currentcedge);

                currentcedge = currentcedge.GetLargerAxisAngleCEdge();
            } while (IncidentCEdge.dblAxisAngle != currentcedge.dblAxisAngle);
            Console.WriteLine("-------------------------------end Around Cpt------------------------------");
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="prevcedge"></param>
        /// <param name="insertedcedge"></param>
        /// <param name="newcedge">newcedge should have a twin edge</param>
        /// <remarks>prevcedge, insertedcedge, and nextcedge should have the same start</remarks>
        public static void InsertCEdgeBySmaller(CEdge SmallerAxisAngleCEdge, CEdge newcedge)
        {
            var LargerAxisAngleCEdge = SmallerAxisAngleCEdge.GetLargerAxisAngleCEdge();

            //maintain the IncidentCEdge information
            //newcedge.dblAxisAngle may just larger than all the Costarted edges,
            //because SmallerAxisAngleCEdge may be the edge with largest AxisAngle
            if (LargerAxisAngleCEdge.isIncidentCEdgeForCpt == true && newcedge.dblAxisAngle < LargerAxisAngleCEdge.dblAxisAngle)
            {
                LargerAxisAngleCEdge.isIncidentCEdgeForCpt = false;
                newcedge.isIncidentCEdgeForCpt             = true;
                LargerAxisAngleCEdge.FrCpt.IncidentCEdge   = newcedge;
            }

            InsertCEdgeInbetween(SmallerAxisAngleCEdge, newcedge, LargerAxisAngleCEdge);
        }