public override IGH_Goo Duplicate() { var res = new GH_Section() { Value = Value.Duplicate(), }; return(res); }
protected override void SolveInstance(IGH_DataAccess DA) { var brpList = DA.GetDataList <Brep>(0); var plnList = DA.GetDataList <Plane>(1); var idList = DA.GetDataList <int>(2); var nameList = DA.GetDataList <string>(3); var outList = new List <GH_Section>(); var name = ""; for (int i = 0; i < brpList.Count; i++) { var brp = brpList.GetItemOrLast(i); var pln = plnList.GetItemOrLast(i); var sec = CreateSection(brp, pln); var id = idList.GetItemOrCountUp(i); if (i < nameList.Count) { name = nameList.GetItemOrLast(i); } else { name = Util.CountStringUp(name); } sec.Id = id; sec.Name = name; var ghSec = new GH_Section() { Value = sec, }; outList.Add(ghSec); } DA.SetDataList(0, outList); }