コード例 #1
0
        public bool isHullVertice(int t, Polyline pl)
        {
            Grasshopper.Kernel.Geometry.Node2List list2 = new Grasshopper.Kernel.Geometry.Node2List();
            List <int> hull = new List <int>();

            for (int i = 0; i < pl.Count; i++)
            {
                Grasshopper.Kernel.Geometry.Node2 node = new Grasshopper.Kernel.Geometry.Node2(pl[i].X, pl[i].Y);
                list2.Append(node);
            }
            Grasshopper.Kernel.Geometry.ConvexHull.Solver.Compute(list2, hull);
            return(hull.Contains(t));
        }
コード例 #2
0
 public bool isHullVertice(int t, Polyline pl)
 {
     Grasshopper.Kernel.Geometry.Node2List list2 = new Grasshopper.Kernel.Geometry.Node2List();
     List<int> hull = new List<int>();
     for (int i = 0; i < pl.Count; i++)
     {
         Grasshopper.Kernel.Geometry.Node2 node = new Grasshopper.Kernel.Geometry.Node2(pl[i].X, pl[i].Y);
         list2.Append(node);
     }
     Grasshopper.Kernel.Geometry.ConvexHull.Solver.Compute(list2, hull);
     return hull.Contains(t);
 }