Esempio n. 1
0
        /// <summary>
        /// Create a Hypar Model from a list of Elements.
        /// </summary>
        /// <param name="elements">The list of Elements that should be added to the model.</param>
        /// <returns name="Model">The Hypar Model to write.</returns>
        public static Elements.Model FromElements(IList <object> elements)
        {
            var model = new Elements.Model();
            var elems = elements.Cast <Elements.Element>().Where(e => e != null);

            model.AddElements(elems);

            return(model);
        }