예제 #1
0
        /// <summary>
        /// Create an IFCManifoldSolidBrep object from a handle of type IfcManifoldSolidBrep.
        /// </summary>
        /// <param name="ifcManifoldSolidBrep">The IFC handle.</param>
        /// <returns>The IFCManifoldSolidBrep object.</returns>
        public static IFCManifoldSolidBrep ProcessIFCManifoldSolidBrep(IFCAnyHandle ifcManifoldSolidBrep)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcManifoldSolidBrep))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcManifoldSolidBrep);
                return(null);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcManifoldSolidBrep, IFCEntityType.IfcFacetedBrep))
            {
                return(IFCFacetedBrep.ProcessIFCFacetedBrep(ifcManifoldSolidBrep));
            }

            if (IFCImportFile.TheFile.SchemaVersion > IFCSchemaVersion.IFC2x3 && IFCAnyHandleUtil.IsSubTypeOf(ifcManifoldSolidBrep, IFCEntityType.IfcAdvancedBrep))
            {
                Importer.TheLog.LogUnhandledSubTypeError(ifcManifoldSolidBrep, IFCEntityType.IfcManifoldSolidBrep, false);
                return(null);
            }

            IFCEntity manifoldSolidBrep;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcManifoldSolidBrep.StepId, out manifoldSolidBrep))
            {
                manifoldSolidBrep = new IFCManifoldSolidBrep(ifcManifoldSolidBrep);
            }
            return(manifoldSolidBrep as IFCManifoldSolidBrep);
        }
예제 #2
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);
        }
예제 #3
0
        /// <summary>
        /// Create an IFCManifoldSolidBrep object from a handle of type IfcManifoldSolidBrep.
        /// </summary>
        /// <param name="ifcManifoldSolidBrep">The IFC handle.</param>
        /// <returns>The IFCManifoldSolidBrep object.</returns>
        public static IFCManifoldSolidBrep ProcessIFCManifoldSolidBrep(IFCAnyHandle ifcManifoldSolidBrep)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcManifoldSolidBrep))
            {
                IFCImportFile.TheLog.LogNullError(IFCEntityType.IfcManifoldSolidBrep);
                return(null);
            }

            IFCEntity manifoldSolidBrep;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcManifoldSolidBrep.StepId, out manifoldSolidBrep))
            {
                manifoldSolidBrep = new IFCManifoldSolidBrep(ifcManifoldSolidBrep);
            }
            return(manifoldSolidBrep as IFCManifoldSolidBrep);
        }
        /// <summary>
        /// Create an IFCManifoldSolidBrep object from a handle of type IfcManifoldSolidBrep.
        /// </summary>
        /// <param name="ifcManifoldSolidBrep">The IFC handle.</param>
        /// <returns>The IFCManifoldSolidBrep object.</returns>
        public static IFCManifoldSolidBrep ProcessIFCManifoldSolidBrep(IFCAnyHandle ifcManifoldSolidBrep)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcManifoldSolidBrep))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcManifoldSolidBrep);
                return null;
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcManifoldSolidBrep, IFCEntityType.IfcFacetedBrep))
                return IFCFacetedBrep.ProcessIFCFacetedBrep(ifcManifoldSolidBrep);

            if (IFCImportFile.TheFile.SchemaVersion > IFCSchemaVersion.IFC2x3 && IFCAnyHandleUtil.IsSubTypeOf(ifcManifoldSolidBrep, IFCEntityType.IfcAdvancedBrep))
            {
               Importer.TheLog.LogUnhandledSubTypeError(ifcManifoldSolidBrep, IFCEntityType.IfcManifoldSolidBrep, false);
               return null;
            }

            IFCEntity manifoldSolidBrep;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcManifoldSolidBrep.StepId, out manifoldSolidBrep))
                manifoldSolidBrep = new IFCManifoldSolidBrep(ifcManifoldSolidBrep);
            return (manifoldSolidBrep as IFCManifoldSolidBrep);
        }
예제 #5
0
        /// <summary>
        /// Create an IFCManifoldSolidBrep object from a handle of type IfcManifoldSolidBrep.
        /// </summary>
        /// <param name="ifcManifoldSolidBrep">The IFC handle.</param>
        /// <returns>The IFCManifoldSolidBrep object.</returns>
        public static IFCManifoldSolidBrep ProcessIFCManifoldSolidBrep(IFCAnyHandle ifcManifoldSolidBrep)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcManifoldSolidBrep))
            {
                IFCImportFile.TheLog.LogNullError(IFCEntityType.IfcManifoldSolidBrep);
                return null;
            }

            IFCEntity manifoldSolidBrep;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcManifoldSolidBrep.StepId, out manifoldSolidBrep))
                manifoldSolidBrep = new IFCManifoldSolidBrep(ifcManifoldSolidBrep);
            return (manifoldSolidBrep as IFCManifoldSolidBrep);
        }