/// <summary>
      /// Creates a handle representing an IfcSweptDiskSolid and assigns it to the file.
      /// </summary>
      /// <param name="file">The file.</param>
      /// <param name="directrix">The curve used to define the sweeping operation.</param>
      /// <param name="radius">The radius of the circular disk to be swept along the directrix.</param>
      /// <param name="innerRadius">This attribute is optional, if present it defines the radius of a circular hole in the centre of the disk.</param>
      /// <param name="startParam">The parameter value on the directrix at which the sweeping operation commences.</param>
      /// <param name="endParam">The parameter value on the directrix at which the sweeping operation ends.</param>
      /// <returns>The handle.</returns>
      public static IFCAnyHandle CreateSweptDiskSolid(IFCFile file, IFCAnyHandle directrix, double radius,
          double? innerRadius, double startParam, double endParam)
      {
         IFCAnyHandleUtil.ValidateSubTypeOf(directrix, false, IFCEntityType.IfcCurve);

         IFCAnyHandle sweptDiskSolid = file.CreateInstance(IFCEntityType.IfcSweptDiskSolid.ToString());
         IFCAnyHandleUtil.SetAttribute(sweptDiskSolid, "Directrix", directrix);
         IFCAnyHandleUtil.SetAttribute(sweptDiskSolid, "Radius", radius);
         IFCAnyHandleUtil.SetAttribute(sweptDiskSolid, "InnerRadius", innerRadius);
         IFCAnyHandleUtil.SetAttribute(sweptDiskSolid, "StartParam", startParam);
         IFCAnyHandleUtil.SetAttribute(sweptDiskSolid, "EndParam", endParam);
         return sweptDiskSolid;
      }
        /////////////////////////////////////////////////////////////////
        // SetXXX method is to set base entities' attributes.
        // Every SetXXX method has a corresponding ValidateXXX method.
        // ValidateXXX is to validate the parameters for the attributes.
        // ValidateXXX should not be called in SetXXX. It must be called in CreateXXX method.
        // This is to make sure all arguments are valid BEFORE create an instance.
        // So we have below layout for these methods:
        //   ValidateABCBaseEntity(...) { ... }
        //   SetABCBaseEntity(...) { ... }
        //   CreateABCEntity(...)
        //      {
        //         //Code to validate ABC entity's own parameters goes here.
        //         ValidateABCBaseEntity(...);
        //         //Code to create ABC instance goes here.
        //         //Code to set ABC entity's own attributes goes here.
        //         SetABCBaseEntity(...);
        //      }
        ///////////////////////////////////////////////////////////////

        private static IFCAnyHandle CreateInstance(IFCFile file, IFCEntityType type)
        {
            IFCAnyHandle hnd = file.CreateInstance(type.ToString());
            ExporterCacheManager.HandleTypeCache[hnd] = type;
            return hnd;
        }