/// <summary>
        /// Calculates the diameter of a provision for void.
        /// </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)
        {
            if (extrusionCreationData == null)
            {
                return(false);
            }

            ProvisionForVoidShapeCalculator shapeCalculator = ProvisionForVoidShapeCalculator.Instance;

            if (shapeCalculator == null || shapeCalculator.GetCurrentElement() != element)
            {
                return(false);
            }

            if (String.Compare(shapeCalculator.GetStringValue(), IFCProvisionForVoidShapeType.Rectangle.ToString()) != 0)
            {
                return(false);
            }

            IFCAnyHandle rectProfile = shapeCalculator.GetCurrentProfileHandle();

            if (IFCAnyHandleUtil.IsNullOrHasNoValue(rectProfile))
            {
                return(false);
            }

            // This is already scaled.
            double?width = IFCAnyHandleUtil.GetDoubleAttribute(rectProfile, "XDim");

            m_Width = width.HasValue ? width.Value : 0.0;
            return(m_Width > MathUtil.Eps());
        }
        /// <summary>
        /// Calculates the diameter of a provision for void.
        /// </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)
        {
            if (extrusionCreationData == null)
            {
                return(false);
            }

            ProvisionForVoidShapeCalculator shapeCalculator = ProvisionForVoidShapeCalculator.Instance;

            if (shapeCalculator == null || shapeCalculator.GetCurrentElement() != element)
            {
                return(false);
            }

            if (String.Compare(shapeCalculator.GetStringValue(), IFCProvisionForVoidShapeType.Round.ToString()) != 0)
            {
                return(false);
            }

            m_Diameter = extrusionCreationData.ScaledOuterPerimeter / Math.PI;
            return(m_Diameter > MathUtil.Eps());
        }