protected override void SolveInstance(IGH_DataAccess da) { var breps = da.GetDataList <Brep>(0); var ids = da.GetDataList <int>(1); var groups = da.GetDataList <int>(2); var thicknss = da.GetDataList <double>(3); var materials = da.GetDataList <int>(4); var matreinfs = da.GetDataList <int>(5); var xdirs = da.GetDataList <Vector3d>(6); var gh_structural_areas = new List <GS_StructuralArea>(); for (int i = 0; i < breps.Count; ++i) { var b = breps[i]; var ga = new GS_StructuralArea() { Value = b, Id = ids.GetItemOrCountUp(i), GroupId = groups.GetItemOrLast(i), MaterialId = materials.GetItemOrLast(i), ReinforcementId = matreinfs.GetItemOrLast(i), Thickness = thicknss.GetItemOrLast(i), DirectionLocalX = xdirs.GetItemOrLast(i) }; gh_structural_areas.Add(ga); } da.SetDataList(0, gh_structural_areas); }
protected override void SolveInstance(IGH_DataAccess da) { var breps = da.GetDataList <Brep>(0); var ids = da.GetDataList <int>(1); var groups = da.GetDataList <int>(2); var thicknss = da.GetDataList <double>(3); var materials = da.GetDataList <int>(4); var matreinfs = da.GetDataList <int>(5); var xdirs = da.GetDataList <Vector3d>(6); var alignment = da.GetDataList <string>(7); var meshOptions = da.GetDataList <string>(8); var elementSize = da.GetDataList <double>(9); var userText = da.GetDataList <string>(10); var gh_structural_areas = new List <GS_StructuralArea>(); for (int i = 0; i < breps.Count; ++i) { var b = breps[i]; if (!(b is null)) { var ga = new GS_StructuralArea() { Value = b, Id = ids.GetItemOrCountUp(i), GroupId = groups.GetItemOrLast(i), MaterialId = materials.GetItemOrLast(i), ReinforcementId = matreinfs.GetItemOrLast(i), Thickness = thicknss.GetItemOrLast(i), DirectionLocalX = xdirs.GetItemOrLast(i), Alignment = parseAlignmentString(alignment.GetItemOrLast(i)), MeshOptions = parseMeshOptionsString(meshOptions.GetItemOrLast(i)), ElementSize = elementSize.GetItemOrLast(i), UserText = userText.GetItemOrLast(i) }; gh_structural_areas.Add(ga); } } da.SetDataList(0, gh_structural_areas); }