Exemplo n.º 1
0
        /// <summary>
        /// Create an IFCSolidModel object from a handle of type IfcSolidModel.
        /// </summary>
        /// <param name="ifcSolidModel">The IFC handle.</param>
        /// <returns>The IFCSolidModel object.</returns>
        public static IFCSolidModel ProcessIFCSolidModel(IFCAnyHandle ifcSolidModel)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcSolidModel))
            {
                IFCImportFile.TheLog.LogNullError(IFCEntityType.IfcSolidModel);
                return(null);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSolidModel, IFCEntityType.IfcCsgSolid))
            {
                return(IFCCSGSolid.ProcessIFCCSGSolid(ifcSolidModel));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSolidModel, IFCEntityType.IfcManifoldSolidBrep))
            {
                return(IFCManifoldSolidBrep.ProcessIFCManifoldSolidBrep(ifcSolidModel));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSolidModel, IFCEntityType.IfcSweptAreaSolid))
            {
                return(IFCSweptAreaSolid.ProcessIFCSweptAreaSolid(ifcSolidModel));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSolidModel, IFCEntityType.IfcSweptDiskSolid))
            {
                return(IFCSweptDiskSolid.ProcessIFCSweptDiskSolid(ifcSolidModel));
            }

            IFCImportFile.TheLog.LogUnhandledSubTypeError(ifcSolidModel, IFCEntityType.IfcSolidModel, true);
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create an IFCCSGSolid object from a handle of type IfcCSGSolid.
        /// </summary>
        /// <param name="ifcSweptAreaSolid">The IFC handle.</param>
        /// <returns>The IFCCSGSolid object.</returns>
        public static IFCCSGSolid ProcessIFCCSGSolid(IFCAnyHandle ifcCSGSolid)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCSGSolid))
            {
                IFCImportFile.TheLog.LogNullError(IFCEntityType.IfcCsgSolid);
                return(null);
            }

            IFCEntity csgSolid;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCSGSolid.StepId, out csgSolid))
            {
                csgSolid = new IFCCSGSolid(ifcCSGSolid);
            }

            return(csgSolid as IFCCSGSolid);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Create an IFCCSGSolid object from a handle of type IfcCSGSolid.
        /// </summary>
        /// <param name="ifcSweptAreaSolid">The IFC handle.</param>
        /// <returns>The IFCCSGSolid object.</returns>
        public static IFCCSGSolid ProcessIFCCSGSolid(IFCAnyHandle ifcCSGSolid)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcCSGSolid))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcCsgSolid);
                return null;
            }

            IFCEntity csgSolid;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcCSGSolid.StepId, out csgSolid))
                csgSolid = new IFCCSGSolid(ifcCSGSolid);

            return (csgSolid as IFCCSGSolid);
        }