Пример #1
0
        /// <summary>
        /// Create an IFCCsgPrimitive3D object from a handle of type IfcCsgPrimitive3D.
        /// </summary>
        /// <param name="ifcCsgPrimitive3D">The IFC handle.</param>
        /// <returns>The IFCCsgPrimitive3D object.</returns>
        public static IFCCsgPrimitive3D ProcessIFCCsgPrimitive3D(IFCAnyHandle ifcCsgPrimitive3D)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCsgPrimitive3D))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCsgPrimitive3D);
                return(null);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcCsgPrimitive3D, IFCEntityType.IfcBlock))
            {
                return(IFCBlock.ProcessIFCBlock(ifcCsgPrimitive3D));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcCsgPrimitive3D, IFCEntityType.IfcCsgPrimitive3D, false);
            return(null);
        }
Пример #2
0
        /// <summary>
        /// Create an IFCBlock object from a handle of type ifcBlock.
        /// </summary>
        /// <param name="ifcBlock">The IFC handle.</param>
        /// <returns>The IFCBlock object.</returns>
        public static IFCBlock ProcessIFCBlock(IFCAnyHandle ifcBlock)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcBlock))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcBlock);
                return(null);
            }

            IFCEntity block;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcBlock.StepId, out block))
            {
                block = new IFCBlock(ifcBlock);
            }

            return(block as IFCBlock);
        }