/// <summary>
        /// returns a Hash for the geometric behaviour of this object
        /// </summary>
        /// <param name="solid"></param>
        /// <returns></returns>
        public static int GetGeometryHashCode(this IfcLoop loop)
        {
            IfcPolyLoop polyLoop = loop as IfcPolyLoop;

            if (polyLoop != null)
            {
                return(polyLoop.GetGeometryHashCode());
            }
            else
            {
                return(loop.GetType().Name.GetHashCode());
            }

            //    throw new XbimGeometryException("Only loops of type IfcPolyLoop are currently supported");
        }
 /// <summary>
 /// Calculates the maximum number of points in this object, does not remove geometric duplicates
 /// </summary>
 /// <param name="sbsm"></param>
 /// <returns></returns>
 public static int NumberOfPointsMax(this IfcLoop loop)
 {
     if (loop is IfcPolyLoop)
     {
         return(((IfcPolyLoop)loop).NumberOfPointsMax());
     }
     else if (loop is IfcVertexLoop)
     {
         return(1);
     }
     else if (loop is IfcEdgeLoop)
     {
         return(((IfcEdgeLoop)loop).NumberOfPointsMax());
     }
     else
     {
         throw new Exception(String.Format("Unexpected loop type {0}", loop.GetType().Name));
     }
 }