/// <summary>
        /// Creates a shape representation or appends existing ones to original representation.
        /// </summary>
        /// <remarks>
        /// This function has two modes.
        /// If originalShapeRepresentation has no value, then this function will create a new ShapeRepresentation handle.
        /// If originalShapeRepresentation has a value, then it is expected to be an aggregation of representations, and the new representation
        /// will be appended to the end of the list.
        /// </remarks>
        /// <param name="exporterIFC">The ExporterIFC object.</param>
        /// <param name="categoryId">The category id.</param>
        /// <param name="contextOfItems">The context for which the different subtypes of representation are valid.</param>
        /// <param name="identifierOpt">The identifier for the representation.</param>
        /// <param name="representationTypeOpt">The type handle for the representation.</param>
        /// <param name="items">Collection of geometric representation items that are defined for this representation.</param>
        /// <param name="originalShapeRepresentation">The original shape representation.</param>
        /// <returns>The handle.</returns>
        public static IFCAnyHandle CreateOrAppendShapeRepresentation(ExporterIFC exporterIFC, Element element, ElementId categoryId, IFCAnyHandle contextOfItems,
                                                                     string identifierOpt, string representationTypeOpt, ISet <IFCAnyHandle> items, IFCAnyHandle originalShapeRepresentation)
        {
            if (!IFCAnyHandleUtil.IsNullOrHasNoValue(originalShapeRepresentation))
            {
                GeometryUtil.AddItemsToShape(originalShapeRepresentation, items);
                return(originalShapeRepresentation);
            }

            return(CreateShapeRepresentation(exporterIFC, element, categoryId, contextOfItems, identifierOpt, representationTypeOpt, items));
        }