public static List <List <double> > St7GetNodeResultsId(List <int> caseIds, St7NodeResultsTypes resultType, St7NodeResultComponent component, List <int> nodeIDs, List <int> nodeUCSs, bool active = false) { List <List <double> > results = new List <List <double> >(); if (!active) { return(results); } int err; double[] nodeResArray = new double[6]; for (int i = 0; i < nodeIDs.Count; i++) { int UCSid = 1; int nodeId = nodeIDs[i]; if (nodeUCSs.Any()) { UCSid = nodeUCSs[i]; } var interResults = new List <double>(); foreach (int loadcaseId in caseIds) { err = St7.St7GetNodeResultUCS(1, (int)resultType, UCSid, nodeId, loadcaseId, nodeResArray); if (component == St7NodeResultComponent.All) { interResults.AddRange(nodeResArray); } else { interResults.Add(nodeResArray[(int)component]); } } results.Add(interResults); } return(results); }
public static List <List <double> > St7GetNodeResults(BHoMAdapter st7Adapter, List <int> caseIds, St7NodeResultsTypes resultType, St7NodeResultComponent component, List <Node> nodes, bool active = false) { List <List <double> > results = new List <List <double> >(); if (!active) { return(results); } int err; // checking node ids double[] nodeResArray = new double[6]; foreach (Node node in nodes) { int UCSid = 1; int nodeId = st7Adapter.GetAdapterId <int>(node); if (node.Support != null) { UCSid = st7Adapter.GetAdapterId <int>(node.Support); } var interResults = new List <double>(); foreach (int loadcaseId in caseIds) { err = St7.St7GetNodeResultUCS(1, (int)resultType, UCSid, nodeId, loadcaseId, nodeResArray); if (component == St7NodeResultComponent.All) { interResults.AddRange(nodeResArray); } else { interResults.Add(nodeResArray[(int)component]); } } results.Add(interResults); } return(results); }