コード例 #1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object can be used to retrieve data from input parameters and
        /// to store data in output parameters.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            bool   allow_skin_variation = false;
            int    max_skin_width       = 0;
            int    max_skin_height      = 0;
            bool   allow_core_variation = false;
            int    core_min_width       = 0;
            int    core_min_height      = 0;
            double efficiency           = 0;
            double deviation            = 0.0;
            int    max_core_count       = 1;

            DA.GetData(0, ref allow_skin_variation);
            DA.GetData(1, ref max_skin_width);
            DA.GetData(2, ref max_skin_height);
            DA.GetData(3, ref allow_core_variation);
            DA.GetData(4, ref core_min_width);
            DA.GetData(5, ref core_min_height);
            DA.GetData(6, ref efficiency);
            DA.GetData(7, ref deviation);
            DA.GetData(8, ref max_core_count);

            generate_tower gt = new generate_tower(ref allow_skin_variation, ref max_skin_width, ref max_skin_height, ref allow_core_variation, ref core_min_width, ref core_min_height, ref efficiency, ref deviation, ref max_core_count);

            DA.SetDataList(0, gt.variable_skin);
            DA.SetDataTree(1, gt.grid_pts_tree);
            DA.SetDataTree(2, gt.grid_val);
            DA.SetDataTree(3, gt.cores);
        }
コード例 #2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object can be used to retrieve data from input parameters and
        /// to store data in output parameters.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int    skin_width      = 0;
            int    skin_height     = 0;
            int    core_min_width  = 0;
            int    core_min_height = 0;
            double efficiency      = 0;
            double deviation       = 0.0;

            DA.GetData(0, ref skin_width);
            DA.GetData(1, ref skin_height);
            DA.GetData(2, ref core_min_width);
            DA.GetData(3, ref core_min_height);
            DA.GetData(4, ref efficiency);
            DA.GetData(5, ref deviation);

            generate_tower gt = new generate_tower(ref skin_width, ref skin_height, ref core_min_width, ref core_min_height, ref efficiency, ref deviation);

            DA.SetData(0, gt.skin);
            DA.SetDataList(1, gt.cores);
            DA.SetDataList(2, gt.grid_pts);
            DA.SetDataTree(3, gt.grid_val);
        }