示例#1
0
        /// <summary>
        /// Create an IFCSweptSurface object from a handle of type IfcSweptSurface.
        /// </summary>
        /// <param name="ifcSweptSurface">The IFC handle.</param>
        /// <returns>The IFCSweptSurface object.</returns>
        public static IFCSweptSurface ProcessIFCSweptSurface(IFCAnyHandle ifcSweptSurface)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcSweptSurface))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcSweptSurface);
                return(null);
            }

            IFCEntity sweptSurface;

            if (IFCImportFile.TheFile.EntityMap.TryGetValue(ifcSweptSurface.StepId, out sweptSurface))
            {
                return(sweptSurface as IFCSweptSurface);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSweptSurface, IFCEntityType.IfcSurfaceOfLinearExtrusion))
            {
                return(IFCSurfaceOfLinearExtrusion.ProcessIFCSurfaceOfLinearExtrusion(ifcSweptSurface));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcSweptSurface, IFCEntityType.IfcSurfaceOfRevolution))
            {
                return(IFCSurfaceOfRevolution.ProcessIFCSurfaceOfRevolution(ifcSweptSurface));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcSweptSurface, IFCEntityType.IfcSweptSurface, true);
            return(null);
        }
示例#2
0
        /// <summary>
        /// Create an IFCSurfaceOfRevolution object from a handle of type IfcSweptSurface.
        /// </summary>
        /// <param name="ifcSurfaceOfRevolution">The IFC handle.</param>
        /// <returns>The IFCSurfaceOfRevolution object.</returns>
        public static IFCSurfaceOfRevolution ProcessIFCSurfaceOfRevolution(IFCAnyHandle ifcSurfaceOfRevolution)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcSurfaceOfRevolution))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcSurfaceOfRevolution);
                return(null);
            }

            IFCEntity surfaceOfRevolution;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcSurfaceOfRevolution.StepId, out surfaceOfRevolution))
            {
                surfaceOfRevolution = new IFCSurfaceOfRevolution(ifcSurfaceOfRevolution);
            }

            return(surfaceOfRevolution as IFCSurfaceOfRevolution);
        }