Ejemplo n.º 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);
        }
        /// <summary>
        /// Create an IFCSurfaceOfLinearExtrusion object from a handle of type IfcSurfaceOfLinearExtrusion.
        /// </summary>
        /// <param name="ifcSurfaceOfLinearExtrusion">The IFC handle.</param>
        /// <returns>The IFCSurfaceOfLinearExtrusion object.</returns>
        public static IFCSurfaceOfLinearExtrusion ProcessIFCSurfaceOfLinearExtrusion(IFCAnyHandle ifcSurfaceOfLinearExtrusion)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcSurfaceOfLinearExtrusion))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcSurfaceOfLinearExtrusion);
                return(null);
            }

            IFCEntity surfaceOfLinearExtrusion;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcSurfaceOfLinearExtrusion.StepId, out surfaceOfLinearExtrusion))
            {
                surfaceOfLinearExtrusion = new IFCSurfaceOfLinearExtrusion(ifcSurfaceOfLinearExtrusion);
            }

            return(surfaceOfLinearExtrusion as IFCSurfaceOfLinearExtrusion);
        }
        /// <summary>
        /// Create an IFCSurfaceOfLinearExtrusion object from a handle of type IfcSurfaceOfLinearExtrusion.
        /// </summary>
        /// <param name="ifcSurfaceOfLinearExtrusion">The IFC handle.</param>
        /// <returns>The IFCSurfaceOfLinearExtrusion object.</returns>
        public static IFCSurfaceOfLinearExtrusion ProcessIFCSurfaceOfLinearExtrusion(IFCAnyHandle ifcSurfaceOfLinearExtrusion)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcSurfaceOfLinearExtrusion))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcSurfaceOfLinearExtrusion);
                return null;
            }

            IFCEntity surfaceOfLinearExtrusion;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcSurfaceOfLinearExtrusion.StepId, out surfaceOfLinearExtrusion))
                surfaceOfLinearExtrusion = new IFCSurfaceOfLinearExtrusion(ifcSurfaceOfLinearExtrusion);

         return (surfaceOfLinearExtrusion as IFCSurfaceOfLinearExtrusion);
        }