Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }