예제 #1
0
        protected override StripResult CreateStrip(ScanLine previous, ScanLine current)
        {
            ScanLine ret1 = new ScanLine(previous.LaserID);
            ScanLine ret2 = new ScanLine(current.LaserID);

            Point3DList all = new Point3DList();

            all.AddRange(previous);
            all.AddRange(current.Where(p2 => previous.All(p1 => p1.Position.Y != p2.Position.Y)));
            all.Sort();
            all.Reverse();
            //            all.AddRange(list1.Union(list2, ));


            for (int i = 0; i < all.Count; i++)
            {
                double  y  = all[i].Position.Y;
                Point3D p1 = previous.GetNearestY(y);
                Point3D p2 = current.GetNearestY(y);
                ret1.Add(p1);
                ret2.Add(p2);
            }
            return(new StripResult(ret1, ret2));
        }
        protected override StripResult CreateStrip(ScanLine previous, ScanLine current)
        {
            ScanLine ret1 = new ScanLine(previous.LaserID);
            ScanLine ret2 = new ScanLine(current.LaserID);

            Point3DList all = new Point3DList();
            all.AddRange(previous);
            all.AddRange(current.Where(p2 => previous.All(p1 => p1.Position.Y != p2.Position.Y)));
            all.Sort();
            all.Reverse();
            //            all.AddRange(list1.Union(list2, ));


            for (int i = 0; i < all.Count; i++)
            {
                double y = all[i].Position.Y;
                Point3D p1 = previous.GetNearestY(y);
                Point3D p2 = current.GetNearestY(y);
                ret1.Add(p1);
                ret2.Add(p2);
            }
            return new StripResult(ret1, ret2);

        }