/// <summary> /// Factories the specified unique name. /// </summary> /// <param name="app">The application.</param> /// <param name="uniqueName">Name of the unique.</param> /// <param name="temperature">The temperature.</param> /// <returns>TendonMaterial.</returns> internal new static TendonMaterial Factory(ApiCSiApplication app, string uniqueName, double temperature = 0) { TendonMaterial material = new TendonMaterial(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> /// Factories the specified unique name. /// </summary> /// <param name="uniqueName">Name of the unique.</param> /// <returns>TendonMaterial.</returns> public new static TendonMaterial Factory(string uniqueName) { if (Registry.Materials.Keys.Contains(uniqueName)) { return((TendonMaterial)Registry.Materials[uniqueName]); } TendonMaterial material = new TendonMaterial(uniqueName); if (_materialProperties != null) { material.FillData(); } Registry.Materials.Add(uniqueName, material); return(material); }