/// <summary>
        /// Create an IFCEllipse object from a handle of type IfcEllipse
        /// </summary>
        /// <param name="ifcEllipse">The IFC handle</param>
        /// <returns>The IFCEllipse object</returns>
        public static IFCEllipse ProcessIFCEllipse(IFCAnyHandle ifcEllipse)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcEllipse))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcEllipse);
                return null;
            }

            IFCEntity ellipse = null;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcEllipse.StepId, out ellipse))
                ellipse = new IFCEllipse(ifcEllipse);

            return (ellipse as IFCEllipse);
        }
        /// <summary>
        /// Create an IFCEllipse object from a handle of type IfcEllipse
        /// </summary>
        /// <param name="ifcEllipse">The IFC handle</param>
        /// <returns>The IFCEllipse object</returns>
        public static IFCEllipse ProcessIFCEllipse(IFCAnyHandle ifcEllipse)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcEllipse))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcEllipse);
                return(null);
            }

            IFCEntity ellipse = null;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcEllipse.StepId, out ellipse))
            {
                ellipse = new IFCEllipse(ifcEllipse);
            }

            return(ellipse as IFCEllipse);
        }
Exemple #3
0
        /// <summary>
        /// Create an IFCConic object from a handle of type IfcConic
        /// </summary>
        /// <param name="ifcConic">The IFC handle</param>
        /// <returns>The IFCConic object</returns>
        public static IFCConic ProcessIFCConic(IFCAnyHandle ifcConic)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcConic))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcConic);
                return(null);
            }

            if (IFCAnyHandleUtil.IsValidSubTypeOf(ifcConic, IFCEntityType.IfcCircle))
            {
                return(IFCCircle.ProcessIFCCircle(ifcConic));
            }
            else if (IFCAnyHandleUtil.IsValidSubTypeOf(ifcConic, IFCEntityType.IfcEllipse))
            {
                return(IFCEllipse.ProcessIFCEllipse(ifcConic));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcConic, IFCEntityType.IfcConic, true);
            return(null);
        }