public List <Point3d> Ptsss(Curve x) //给定曲线找出其控制点
        {
            NurbsCurve     mm   = x.ToNurbsCurve();
            ControlPoint   list = new ControlPoint();
            List <Point3d> ptss = new List <Point3d>();

            Rhino.Geometry.Collections.NurbsCurvePointList listA = mm.Points;
            for (int i = 0; i < listA.Count; i++)
            {
                list = listA.ElementAt(i);
                Point3d pt = list.Location;
                ptss.Add(pt);
            }
            return(ptss);
        }
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////给定曲线找出其控制点
        public static List <Point3d> Ptsss(Curve x)
        {
            NurbsCurve     mm   = x.ToNurbsCurve();
            ControlPoint   list = new ControlPoint();
            List <Point3d> ptss = new List <Point3d>();

            Rhino.Geometry.Collections.NurbsCurvePointList listA = mm.Points;
            for (int i = 0; i < listA.Count; i++)
            {
                list = listA.ElementAt(i);
                Point3d pt = list.Location;
                ptss.Add(pt);
            }
            List <Point3d> ptssResult = ptss.Distinct().ToList();/////删除重合部分(多边形)

            return(ptssResult);
        }