/// <summary>
        /// Calculates the start hook angle for a rebar.
        /// </summary>
        /// <param name="exporterIFC">The ExporterIFC object.</param>
        /// <param name="extrusionCreationData">The IFCExtrusionCreationData.</param>
        /// <param name="element">The element to calculate the value.</param>
        /// <param name="elementType">The element type.</param>
        /// <returns>
        /// True if the operation succeed, false otherwise.
        /// </returns>
        public override bool Calculate(ExporterIFC exporterIFC, IFCExtrusionCreationData extrusionCreationData, Element element, ElementType elementType)
        {
            RebarBendData bendData = null;

            if (element is Rebar)
            {
                bendData = (element as Rebar).GetBendData();
            }
            else if (element is RebarInSystem)
            {
                bendData = (element as RebarInSystem).GetBendData();
            }

            if (bendData != null)
            {
                if (bendData.HookLength0 > MathUtil.Eps())
                {
                    ElementId hookAtStartTypeId;
                    if (ParameterUtil.GetElementIdValueFromElement(element, BuiltInParameter.REBAR_ELEM_HOOK_START_TYPE, out hookAtStartTypeId) != null)
                    {
                        RebarHookType rebarHookType = element.Document.GetElement(hookAtStartTypeId) as RebarHookType;
                        if (rebarHookType != null)
                        {
                            //HookAngle is measured in radians, so scale directly.
                            m_Angle = rebarHookType.HookAngle * 180 / Math.PI;
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
        /// <summary>
        /// Calculates the shape code for a rebar.
        /// </summary>
        /// <param name="exporterIFC">The ExporterIFC object.</param>
        /// <param name="extrusionCreationData">The IFCExtrusionCreationData.</param>
        /// <param name="element">The element to calculate the value.</param>
        /// <param name="elementType">The element type.</param>
        /// <returns>
        /// True if the operation succeed, false otherwise.
        /// </returns>
        public override bool Calculate(ExporterIFC exporterIFC, IFCExtrusionCreationData extrusionCreationData, Element element, ElementType elementType)
        {
            ElementId rebarShapeId;

            if (ParameterUtil.GetElementIdValueFromElement(element, BuiltInParameter.REBAR_SHAPE, out rebarShapeId) == null)
            {
                return(false);
            }

            Element rebarShape = element.Document.GetElement(rebarShapeId);

            if (rebarShape == null)
            {
                return(false);
            }

            m_ShapeCode = rebarShape.Name;
            return(true);
        }