/// <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))
            {
                return(IFCAdvancedBrep.ProcessIFCAdvancedBrep(ifcManifoldSolidBrep));
            }

            IFCEntity manifoldSolidBrep;

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

            IFCEntity advancedBrep;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcAdvancedBrep.StepId, out advancedBrep))
            {
                advancedBrep = new IFCAdvancedBrep(ifcAdvancedBrep);
            }
            return(advancedBrep as IFCAdvancedBrep);
        }