override protected void Process(IFCAnyHandle item)
        {
            base.Process(item);

            LayerAssignment = IFCPresentationLayerAssignment.GetTheLayerAssignment(item);

            // IFC2x has a different representation for styled items which we don't support.
            ICollection <IFCAnyHandle> styledByItems = null;

            if (Importer.TheCache.StyledByItems.TryGetValue(item, out styledByItems))
            {
                if (styledByItems != null && styledByItems.Count > 0)
                {
                    // We can only handle one styled item, but we allow the possiblity that there are duplicates.  Do a top-level check.
                    foreach (IFCAnyHandle styledByItem in styledByItems)
                    {
                        if (!IFCAnyHandleUtil.IsSubTypeOf(styledByItem, IFCEntityType.IfcStyledItem))
                        {
                            Importer.TheLog.LogUnexpectedTypeError(styledByItem, IFCEntityType.IfcStyledItem, false);
                            StyledByItem = null;
                            break;
                        }
                        else
                        {
                            if (StyledByItem == null)
                            {
                                StyledByItem = IFCStyledItem.ProcessIFCStyledItem(styledByItem);
                            }
                            else
                            {
                                IFCStyledItem compStyledByItem = IFCStyledItem.ProcessIFCStyledItem(styledByItem);
                                if (!StyledByItem.IsEquivalentTo(compStyledByItem))
                                {
                                    Importer.TheLog.LogWarning(Id, "Multiple inconsistent styled items found for this item; using first one.", false);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        override protected void Process(IFCAnyHandle item)
        {
            base.Process(item);

            LayerAssignment = IFCPresentationLayerAssignment.GetTheLayerAssignment(item, false);

            List <IFCAnyHandle> styledByItems = IFCAnyHandleUtil.GetAggregateInstanceAttribute <List <IFCAnyHandle> >(item, "StyledByItem");

            if (styledByItems != null && styledByItems.Count > 0)
            {
                // We can only handle one styled item, but we allow the possiblity that there are duplicates.  Do a top-level check.
                foreach (IFCAnyHandle styledByItem in styledByItems)
                {
                    if (!IFCAnyHandleUtil.IsSubTypeOf(styledByItem, IFCEntityType.IfcStyledItem))
                    {
                        Importer.TheLog.LogUnexpectedTypeError(styledByItem, IFCEntityType.IfcStyledItem, false);
                        StyledByItem = null;
                        break;
                    }
                    else
                    {
                        if (StyledByItem == null)
                        {
                            StyledByItem = IFCStyledItem.ProcessIFCStyledItem(styledByItem);
                        }
                        else
                        {
                            IFCStyledItem compStyledByItem = IFCStyledItem.ProcessIFCStyledItem(styledByItem);
                            if (!StyledByItem.IsEquivalentTo(compStyledByItem))
                            {
                                Importer.TheLog.LogWarning(Id, "Multiple inconsistent styled items found for this item; using first one.", false);
                                break;
                            }
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Processes IfcRepresentation attributes.
        /// </summary>
        /// <param name="ifcRepresentation">The IfcRepresentation handle.</param>
        override protected void Process(IFCAnyHandle ifcRepresentation)
        {
            base.Process(ifcRepresentation);

            IFCAnyHandle representationContext = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcRepresentation, "ContextOfItems", false);

            if (representationContext != null)
            {
                Context = IFCRepresentationContext.ProcessIFCRepresentationContext(representationContext);
            }

            string identifier = IFCImportHandleUtil.GetOptionalStringAttribute(ifcRepresentation, "RepresentationIdentifier", null);

            Identifier = GetRepresentationIdentifier(identifier, ifcRepresentation);

            Type = IFCImportHandleUtil.GetOptionalStringAttribute(ifcRepresentation, "RepresentationType", null);

            HashSet <IFCAnyHandle> items =
                IFCAnyHandleUtil.GetAggregateInstanceAttribute <HashSet <IFCAnyHandle> >(ifcRepresentation, "Items");

            LayerAssignment = IFCPresentationLayerAssignment.GetTheLayerAssignment(ifcRepresentation, true);

            foreach (IFCAnyHandle item in items)
            {
                IFCRepresentationItem repItem = null;
                try
                {
                    if (NotAllowedInRepresentation(item))
                    {
                        IFCEntityType entityType = IFCAnyHandleUtil.GetEntityType(item);
                        Importer.TheLog.LogWarning(item.StepId, "Ignoring unhandled representation item of type " + entityType.ToString() + " in " +
                                                   Identifier.ToString() + " representation.", true);
                        continue;
                    }

                    // Special processing for bounding boxes - only IfcBoundingBox allowed.
                    if (IFCAnyHandleUtil.IsSubTypeOf(item, IFCEntityType.IfcBoundingBox))
                    {
                        // Don't read in Box represenation unless options allow it.
                        if (IFCImportFile.TheFile.Options.ProcessBoundingBoxGeometry == IFCProcessBBoxOptions.Never)
                        {
                            Importer.TheLog.LogWarning(item.StepId, "BoundingBox not imported with ProcessBoundingBoxGeometry=Never", false);
                        }
                        else
                        {
                            if (BoundingBox != null)
                            {
                                Importer.TheLog.LogWarning(item.StepId, "Found second IfcBoundingBox representation item, ignoring.", false);
                                continue;
                            }
                            BoundingBox = ProcessBoundingBox(item);
                        }
                    }
                    else
                    {
                        repItem = IFCRepresentationItem.ProcessIFCRepresentationItem(item);
                    }
                }
                catch (Exception ex)
                {
                    Importer.TheLog.LogError(item.StepId, ex.Message, false);
                }
                if (repItem != null)
                {
                    RepresentationItems.Add(repItem);
                }
            }
        }