예제 #1
0
        override protected void Process(IFCAnyHandle ifcManifoldSolidBrep)
        {
            base.Process(ifcManifoldSolidBrep);

            // We will not fail if the transform is not given, but instead assume it to be the identity.
            IFCAnyHandle ifcOuter = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcManifoldSolidBrep, "Outer", true);

            Outer = IFCClosedShell.ProcessIFCClosedShell(ifcOuter);

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcManifoldSolidBrep, IFCEntityType.IfcFacetedBrepWithVoids))
            {
                HashSet <IFCAnyHandle> ifcVoids =
                    IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcManifoldSolidBrep, "Voids");
                if (ifcVoids != null)
                {
                    foreach (IFCAnyHandle ifcVoid in ifcVoids)
                    {
                        try
                        {
                            Inners.Add(IFCClosedShell.ProcessIFCClosedShell(ifcVoid));
                        }
                        catch
                        {
                            // LOG: WARNING: #: Invalid inner shell ifcVoid.StepId, ignoring.
                        }
                    }
                }
            }
        }
예제 #2
0
        override protected void Process(IFCAnyHandle ifcManifoldSolidBrep)
        {
            base.Process(ifcManifoldSolidBrep);

            // We will not fail if the transform is not given, but instead assume it to be the identity.
            IFCAnyHandle ifcOuter = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcManifoldSolidBrep, "Outer", true);

            Outer = IFCClosedShell.ProcessIFCClosedShell(ifcOuter);
        }
        /// <summary>
        /// Create an IFCClosedShell object from a handle of type IfcClosedShell.
        /// </summary>
        /// <param name="ifcClosedShell">The IFC handle.</param>
        /// <returns>The IFClosedShell object.</returns>
        public static IFCClosedShell ProcessIFCClosedShell(IFCAnyHandle ifcClosedShell)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcClosedShell))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcClosedShell);
                return null;
            }

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

            IFCEntity closedShell;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcClosedShell.StepId, out closedShell))
            {
                closedShell = new IFCClosedShell(ifcClosedShell);
            }
            return(closedShell as IFCClosedShell);
        }
예제 #5
0
        override protected void Process(IFCAnyHandle ifcFacetedBrep)
        {
            base.Process(ifcFacetedBrep);

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcFacetedBrep, IFCEntityType.IfcFacetedBrepWithVoids))
            {
                HashSet <IFCAnyHandle> ifcVoids =
                    IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcFacetedBrep, "Voids");
                if (ifcVoids != null)
                {
                    foreach (IFCAnyHandle ifcVoid in ifcVoids)
                    {
                        try
                        {
                            Inners.Add(IFCClosedShell.ProcessIFCClosedShell(ifcVoid));
                        }
                        catch
                        {
                            Importer.TheLog.LogWarning(ifcVoid.StepId, "Invalid inner shell, ignoring", false);
                        }
                    }
                }
            }
        }
        override protected void Process(IFCAnyHandle ifcManifoldSolidBrep)
        {
            base.Process(ifcManifoldSolidBrep);

            // We will not fail if the transform is not given, but instead assume it to be the identity.
            IFCAnyHandle ifcOuter = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcManifoldSolidBrep, "Outer", true);
            Outer = IFCClosedShell.ProcessIFCClosedShell(ifcOuter);

            
        }