public static List <Point3d> GetBoundaryLine2d(List <Int16Triple> regionPoints, bool smoothing, int iteration)
        {
            Box3Int  box = GetBox3(regionPoints);
            int      stx = 0, sty = 0;
            BitMap2d bmp_1 = GetMappedBitmap(regionPoints, box, ref stx, ref sty);
            // bmp_1.OutputBitMap("1.bmp");
            BitMap2d bmp_2 = GetSingleRegionBitmap(bmp_1);

            // bmp_2.OutputBitMap("2.bmp");
            bmp_1 = null;
            SquarSurface mc2      = new SquarSurface(bmp_2);
            PolyLine     polyline = mc2.GenerateLine();

            if (smoothing && iteration >= 1)
            {
                for (int i = 0; i < iteration; i++)
                {
                    SmoothingLine(polyline);
                }
            }
            // PlyManager.Output2(polyline.Points,polyline.Edges,"3.ply");
            List <FloatDouble> points = polyline.GetDrawablePointList();
            List <Point3d>     ret    = new List <Point3d>(points.Count);

            for (int i = 0; i < points.Count; i++)
            {
                ret.Add(new Point3d(points[i].X + stx, points[i].Y + sty, 0));
            }
            return(ret);
        }