Ejemplo n.º 1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            List <Mesh> mesh = new List <Mesh>();

            if (DA.GetDataList(0, mesh))
            {
                List <int>[] mc = MeshUtilSimple.MeshCollisions(mesh);
                DA.SetDataTree(0, GrasshopperUtil.ArrayOfListsToTree(mc));

                //Next check overlapping faces only if ngons exists

                List <Polyline[]>[] mcPlines = new List <Polyline[]> [mc.Length];

                for (int i = 0; i < mc.Length; i++)
                {
                    mcPlines[i] = new List <Polyline[]>();

                    for (int j = 0; j < mc[i].Count; j++)
                    {
                        //Do it with ngons
                        MeshUtil.GetOverlap(mesh[i], mesh[mc[i][j]], 0.1);
                    }
                }
            }//if
        }