예제 #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Mesh mesh = null;

            DA.GetData(0, ref mesh);

            List <bool> cullPattern = new List <bool>();

            DA.GetDataList(1, cullPattern);

            List <double> values = new List <double>();

            DA.GetDataList(2, values);

            Asystem asystem = new Asystem(values, mesh, cullPattern);

            List <Point3d> output   = new List <Point3d>();
            List <int>     indicies = new List <int>();

            for (int i = 0; i < asystem.Apoints.Count; i++)
            {
                output.Add(asystem.Apoints[i].Pos);
                indicies.Add(asystem.Apoints[i].Index);
            }

            DA.SetData(0, asystem);
            DA.SetDataList(1, output);
            DA.SetDataList(2, indicies);
        }
예제 #2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int iterations = 0;

            DA.GetData("Iterations", ref iterations);

            currentI = 0;

            //double treshold = 0.0;
            //DA.GetData("Threshold", ref treshold);

            Asystem angelfish = null;

            DA.GetData("Angelfish", ref angelfish);
            reactDiffuse = new Pattern(angelfish);


            while (currentI < iterations)
            {
                reactDiffuse.Update();
                currentI++;
            }


            //reactDiffuse.DividePoints(treshold);
            DA.SetData(0, reactDiffuse);
            //DA.SetDataList("Solid", reactDiffuse.Solid);
            //DA.SetDataList("Void", reactDiffuse.Void);
        }
예제 #3
0
        public Pattern(Asystem _asystem) : base(_asystem)
        {
            Apoints = _asystem.Apoints;
            rdSize  = Apoints.Count;

            Setup();
            Start();
        }
예제 #4
0
        public Asystem(Asystem _asystem)
        {
            this.edgeCount = _asystem.edgeCount;
            this.min       = _asystem.min;
            this.max       = _asystem.max;

            this.excludeX = _asystem.excludeX;
            this.excludeY = _asystem.excludeY;
            this.excludeZ = _asystem.excludeZ;
        }
예제 #5
0
        public Region(Asystem _asystem)
        {
            this.Apoints   = _asystem.Apoints;
            this.edgeCount = _asystem.edgeCount;
            this.min       = _asystem.min;
            this.max       = _asystem.max;

            this.excludeX = _asystem.excludeX;
            this.excludeY = _asystem.excludeY;
            this.excludeZ = _asystem.excludeZ;

            this.mesh = _asystem.mesh;
        }
예제 #6
0
파일: GhcSet.cs 프로젝트: jmhannu/Angelfish
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Mesh mesh = null;

            DA.GetData("Mesh", ref mesh);

            List <double> values = new List <double>();

            DA.GetDataList("Varibles", values);

            angelfishSystem = new Asystem(values, mesh);

            //    int index = 0;
            //    DA.GetData("Index", ref index);

            DA.SetData(0, angelfishSystem);
            DA.SetData(1, angelfishSystem.min);
            DA.SetData(2, angelfishSystem.max);
            DA.SetData(3, angelfishSystem.edgeCount);
        }
예제 #7
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Mesh mesh = null;

            DA.GetData(0, ref mesh);

            List <Region> regions = new List <Region>();
            Asystem       aux     = new Asystem();

            for (int i = 1; i < Params.Input.Count; i++)
            {
                if (DA.GetData(i, ref aux))
                {
                    regions.Add(new Region(aux));
                }
            }

            Gradient gradient = new Gradient(regions, mesh);

            DA.SetData(0, gradient);
            DA.SetDataList(1, gradient.colors);
        }