Ejemplo n.º 1
0
        public static IFCTopologicalRepresentationItem ProcessIFCTopologicalRepresentationItem(IFCAnyHandle ifcTopologicalRepresentationItem)
        {
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcConnectedFaceSet))
            {
                return(IFCConnectedFaceSet.ProcessIFCConnectedFaceSet(ifcTopologicalRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcEdge))
            {
                return(IFCEdge.ProcessIFCEdge(ifcTopologicalRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcFace))
            {
                return(IFCFace.ProcessIFCFace(ifcTopologicalRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcLoop))
            {
                return(IFCLoop.ProcessIFCLoop(ifcTopologicalRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcTopologicalRepresentationItem, IFCEntityType.IfcVertex))
            {
                return(IFCVertex.ProcessIFCVertex(ifcTopologicalRepresentationItem));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcTopologicalRepresentationItem, IFCEntityType.IfcTopologicalRepresentationItem, true);
            return(null);
        }
Ejemplo n.º 2
0
        override protected void Process(IFCAnyHandle ifcFaceBasedSurfaceModel)
        {
            base.Process(ifcFaceBasedSurfaceModel);

            ISet <IFCAnyHandle> ifcShells = IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcFaceBasedSurfaceModel, "FbsmFaces");

            foreach (IFCAnyHandle ifcShell in ifcShells)
            {
                IFCConnectedFaceSet shell = IFCConnectedFaceSet.ProcessIFCConnectedFaceSet(ifcShell);
                if (shell != null)
                {
                    shell.AllowInvalidFace = true;
                    Shells.Add(shell);
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create an IFConnectedFaceSet object from a handle of type IfcConnectedFaceSet.
        /// </summary>
        /// <param name="ifcConnectedFaceSet">The IFC handle.</param>
        /// <returns>The IFCConnectedFaceSet object.</returns>
        public static IFCConnectedFaceSet ProcessIFCConnectedFaceSet(IFCAnyHandle ifcConnectedFaceSet)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcConnectedFaceSet))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcConnectedFaceSet);
                return(null);
            }

            IFCEntity connectedFaceSet;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcConnectedFaceSet.StepId, out connectedFaceSet))
            {
                connectedFaceSet = new IFCConnectedFaceSet(ifcConnectedFaceSet);
            }
            return(connectedFaceSet as IFCConnectedFaceSet);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Processes an IfcRepresentationItem entity handle.
        /// </summary>
        /// <param name="ifcRepresentationItem">The IfcRepresentationItem handle.</param>
        /// <returns>The IFCRepresentationItem object.</returns>
        public static IFCRepresentationItem ProcessIFCRepresentationItem(IFCAnyHandle ifcRepresentationItem)
        {
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcBooleanResult))
            {
                return(IFCBooleanResult.ProcessIFCBooleanResult(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcConnectedFaceSet))
            {
                return(IFCConnectedFaceSet.ProcessIFCConnectedFaceSet(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcCurve))
            {
                return(IFCCurve.ProcessIFCCurve(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcFaceBasedSurfaceModel))
            {
                return(IFCFaceBasedSurfaceModel.ProcessIFCFaceBasedSurfaceModel(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcGeometricSet))
            {
                return(IFCGeometricSet.ProcessIFCGeometricSet(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcMappedItem))
            {
                return(IFCMappedItem.ProcessIFCMappedItem(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcShellBasedSurfaceModel))
            {
                return(IFCShellBasedSurfaceModel.ProcessIFCShellBasedSurfaceModel(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcSolidModel))
            {
                return(IFCSolidModel.ProcessIFCSolidModel(ifcRepresentationItem));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcRepresentationItem, IFCEntityType.IfcStyledItem))
            {
                return(IFCStyledItem.ProcessIFCStyledItem(ifcRepresentationItem));
            }

            IFCImportFile.TheLog.LogUnhandledSubTypeError(ifcRepresentationItem, IFCEntityType.IfcRepresentationItem, true);
            return(null);
        }
        /// <summary>
        /// Create an IFConnectedFaceSet object from a handle of type IfcConnectedFaceSet.
        /// </summary>
        /// <param name="ifcConnectedFaceSet">The IFC handle.</param>
        /// <returns>The IFCConnectedFaceSet object.</returns>
        public static IFCConnectedFaceSet ProcessIFCConnectedFaceSet(IFCAnyHandle ifcConnectedFaceSet)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcConnectedFaceSet))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcConnectedFaceSet);
                return null;
            }

            IFCEntity connectedFaceSet;
            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcConnectedFaceSet.StepId, out connectedFaceSet))
                connectedFaceSet = new IFCConnectedFaceSet(ifcConnectedFaceSet);
            return (connectedFaceSet as IFCConnectedFaceSet);
        }