コード例 #1
0
        public static void Remove_Redundant_Point(LJJSPoint startPoint, List <LJJSPoint> list)
        {
            /**
             * Comparison<LJJSPoint> Sort_Dele = (a, b) =>
             * {
             *
             *  if (a.YValue > b.YValue)
             *  {
             *      return 1;
             *  }
             *  else if (a.YValue == b.YValue)
             *  {
             *      return 0;
             *  }
             *  else
             *  {
             *      return -1;
             *  }
             * };**/
            List <LJJSPoint> redund_list = MsehAndMsevContainer.same_YValue_PointsList(list);

            //redund_list.Sort(Sort_Dele);
            AddLineHatchManager.my_list_LJJSPOint_sort(redund_list);

            for (int ss = 0; ss < redund_list.Count - 1; ss++)
            {
                if (redund_list[ss].YValue == redund_list[ss + 1].YValue)
                {
                    list.Remove(redund_list[ss]);
                }
            }

            //list.Sort(Sort_Dele);
            AddLineHatchManager.my_list_LJJSPOint_sort(list);
        }