/// <summary>
        /// Create an IFCAdvancedFace object from a handle of type IfcAdvancedFace.
        /// </summary>
        /// <param name="ifcAdvancedFace">The IFC handle.</param>
        /// <returns>The IFCAdvancedFace object.</returns>
        public static IFCAdvancedFace ProcessIFCAdvancedFace(IFCAnyHandle ifcAdvancedFace)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcAdvancedFace))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcAdvancedFace);
                return null;
            }

            IFCEntity face;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcAdvancedFace.StepId, out face))
                face = new IFCAdvancedFace(ifcAdvancedFace);
            return (face as IFCAdvancedFace);
        }
예제 #2
0
        /// <summary>
        /// Create an IFCAdvancedFace object from a handle of type IfcAdvancedFace.
        /// </summary>
        /// <param name="ifcAdvancedFace">The IFC handle.</param>
        /// <returns>The IFCAdvancedFace object.</returns>
        public static IFCAdvancedFace ProcessIFCAdvancedFace(IFCAnyHandle ifcAdvancedFace)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcAdvancedFace))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcAdvancedFace);
                return(null);
            }

            IFCEntity face;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcAdvancedFace.StepId, out face))
            {
                face = new IFCAdvancedFace(ifcAdvancedFace);
            }
            return(face as IFCAdvancedFace);
        }
예제 #3
0
        /// <summary>
        /// Create an IFCFaceSurface object from a handle of type IfcFaceSurface.
        /// </summary>
        /// <param name="ifcFaceSurface">The IFC handle.</param>
        /// <returns>The IFCFace object.</returns>
        public static IFCFaceSurface ProcessIFCFaceSurface(IFCAnyHandle ifcFaceSurface)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcFaceSurface))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcFaceSurface);
                return(null);
            }

            if (IFCImportFile.TheFile.SchemaVersion > IFCSchemaVersion.IFC2x3 && IFCAnyHandleUtil.IsValidSubTypeOf(ifcFaceSurface, IFCEntityType.IfcAdvancedFace))
            {
                return(IFCAdvancedFace.ProcessIFCAdvancedFace(ifcFaceSurface));
            }
            IFCEntity face;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcFaceSurface.StepId, out face))
            {
                face = new IFCFaceSurface(ifcFaceSurface);
            }
            return(face as IFCFaceSurface);
        }