/// <summary> /// Returns a new steel material class. /// </summary> /// <param name="app">The application.</param> /// <param name="uniqueName">Unique material name.</param> /// <param name="temperature">The temperature.</param> /// <returns>Steel.</returns> internal new static Steel Factory(ApiCSiApplication app, string uniqueName, double temperature = 0) { Steel material = new Steel(app, uniqueName, temperature); material.FillData(); return(material); }
/// <summary> /// Returns a new material class. /// </summary> /// <param name="name">Unique material name.</param> /// <returns>Steel.</returns> public static Material Factory(string name) { if (Registry.Materials.Keys.Contains(name)) { return(Registry.Materials[name]); } Tuple <eMaterialPropertyType, eMaterialSymmetryType> materialTypes = GetMaterialType(name); Material material; switch (materialTypes.Item1) { case eMaterialPropertyType.Steel: material = Steel.Factory(name); break; case eMaterialPropertyType.Concrete: material = Concrete.Factory(name); break; case eMaterialPropertyType.Masonry: material = Masonry.Factory(name); break; case eMaterialPropertyType.Tendon: material = TendonMaterial.Factory(name); break; case eMaterialPropertyType.Rebar: material = Rebar.Factory(name); break; #if !BUILD_ETABS2015 && !BUILD_ETABS2016 && !BUILD_ETABS2017 case eMaterialPropertyType.Aluminum: material = Aluminum.Factory(name, app); break; case eMaterialPropertyType.ColdFormed: material = ColdFormed.Factory(name, app); break; #endif case eMaterialPropertyType.NoDesign: return(null); default: return(null); } Registry.Materials.Add(name, material); return(material); }
/// <summary> /// Returns a new steel material class. /// </summary> /// <param name="uniqueName">Unique material name.</param> /// <returns>Steel.</returns> public new static Steel Factory(string uniqueName) { if (Registry.Materials.Keys.Contains(uniqueName)) { return((Steel)Registry.Materials[uniqueName]); } Steel material = new Steel(uniqueName); if (_materialProperties != null) { material.FillData(); } Registry.Materials.Add(uniqueName, material); return(material); }