/// <summary> /// Adds a new frame section to the model. /// </summary> public FrameSection AddFrameSection(string name, Material material, double area, double momentofinertia) { FrameSection s = new FrameSection(name, material, area, momentofinertia); FrameSections.Add(s); return(s); }
/// <summary> /// Erases all model items. /// </summary> public void ResetModel() { ResetLastStiffnessMatrix(); Nodes.Clear(); Materials.Clear(); FrameSections.Clear(); Frames.Clear(); Springs.Clear(); AnalysisCases.Clear(); Combinations.Clear(); }
private static List <T> getSectionsByType <T>(FrameSections frameSections) where T : FrameSection { List <T> sections = new List <T>(); foreach (FrameSection frameSection in frameSections) { if (!(frameSection is T validSection)) { continue; } sections.Add(validSection); } return(sections); }