Пример #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            var idList         = DA.GetDataList <int>(0);
            var nameList       = DA.GetDataList <string>(1);
            var materialIdList = DA.GetDataList <int>(2);

            var outList = new List <GH_SectionAttributes>();

            var count = Math.Max(idList.Count, nameList.Count);

            count = Math.Max(count, materialIdList.Count);

            for (int i = 0; i < count; i++)
            {
                var secAt = new SectionAttributes()
                {
                    Id         = idList.GetItemOrCountUp(i),
                    Name       = nameList.GetItemOrLast(i),
                    MaterialId = materialIdList.GetItemOrLast(i),
                };
                var ghSecAt = new GH_SectionAttributes()
                {
                    Value = secAt,
                };
                outList.Add(ghSecAt);
            }

            DA.SetDataList(0, outList);
        }
Пример #2
0
        public override IGH_Goo Duplicate()
        {
            var res = new GH_SectionAttributes()
            {
                Value = Value.Duplicate(),
            };

            return(res);
        }