Exemple #1
0
        /// <summary>
        /// Create an IFCCircle from a handle of type IfcCircle
        /// </summary>
        /// <param name="ifcCircle">The IFC handle</param>
        /// <returns>The IFCCircle object</returns>
        public static IFCCircle ProcessIFCCircle(IFCAnyHandle ifcCircle)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCircle))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCircle);
                return(null);
            }

            IFCEntity circle = null;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCircle.StepId, out circle))
            {
                circle = new IFCCircle(ifcCircle);
            }

            return(circle as IFCCircle);
        }
Exemple #2
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);
        }
        /// <summary>
        /// Create an IFCCircle from a handle of type IfcCircle
        /// </summary>
        /// <param name="ifcCircle">The IFC handle</param>
        /// <returns>The IFCCircle object</returns>
        public static IFCCircle ProcessIFCCircle(IFCAnyHandle ifcCircle)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCircle))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCircle);
                return null;
            }

            IFCEntity circle = null;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCircle.StepId, out circle))
                circle = new IFCCircle(ifcCircle);

            return (circle as IFCCircle);
        }