protected override void SolveInstance(IGH_DataAccess da) { var curves = da.GetDataList <Curve>(0); var identifiers = da.GetDataList <int>(1); var groups = da.GetDataList <int>(2); var sections = da.GetDataList <int>(3); var zdirs = da.GetDataList <Vector3d>(4); var fixations = da.GetDataList <string>(5); var gh_structural_curves = new List <GS_StructuralLine>(); for (int i = 0; i < curves.Count; ++i) { var c = curves[i]; var gc = new GS_StructuralLine() { Value = c, Id = identifiers.GetItemOrCountUp(i), GroupId = groups.GetItemOrLast(i), SectionId = sections.GetItemOrLast(i), DirectionLocalZ = zdirs.GetItemOrLast(i), FixLiteral = fixations.GetItemOrLast(i) }; gh_structural_curves.Add(gc); } da.SetDataList(0, gh_structural_curves); }
protected override void SolveInstance(IGH_DataAccess da) { var curves = da.GetDataList <Curve>(0); var identifiers = da.GetDataList <int>(1); var groups = da.GetDataList <int>(2); var sections = da.GetDataList <string>(3); var zdirs = da.GetDataList <Vector3d>(4); var fixations = da.GetDataList <string>(5); var elementType = da.GetDataList <string>(6); var elementSize = da.GetDataList <double>(7); var userText = da.GetDataList <string>(8); var gh_structural_curves = new List <GS_StructuralLine>(); for (int i = 0; i < curves.Count; ++i) { var c = curves[i]; if (!(c is null)) { var section_ids = Util.ParseSectionIdentifier(sections.GetItemOrLast(i)); var gc = new GS_StructuralLine() { Value = c, Id = identifiers.GetItemOrCountUp(i), GroupId = groups.GetItemOrLast(i), SectionIdStart = section_ids.Item1, SectionIdEnd = section_ids.Item2, DirectionLocalZ = zdirs.GetItemOrLast(i), FixLiteral = fixations.GetItemOrLast(i), ElementType = parseElementTypeString(elementType.GetItemOrLast(i)), ElementSize = elementSize.GetItemOrLast(i), UserText = userText.GetItemOrLast(i) }; gh_structural_curves.Add(gc); } } da.SetDataList(0, gh_structural_curves); }