示例#1
0
        /// <summary>
        /// Calculates total area for a roof
        /// </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)
        {
            double scale = exporterIFC.LinearScale;

            m_Area = ExporterIFCUtils.ComputeRoofProjectedArea(element) * scale * scale;
            return(m_Area > MathUtil.Eps() * MathUtil.Eps());
        }
        /// <summary>
        /// Calculates total area for a roof
        /// </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)
        {
            ParameterUtil.GetDoubleValueFromElementOrSymbol(element, "ProjectedArea", out m_Area);
            if (m_Area > MathUtil.Eps() * MathUtil.Eps())
            {
                return(true);
            }

            m_Area = UnitUtil.ScaleArea(ExporterIFCUtils.ComputeRoofProjectedArea(element));
            return(m_Area > MathUtil.Eps() * MathUtil.Eps());
        }
        /// <summary>
        /// Calculates total area for a roof
        /// </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, EntryMap entryMap)
        {
            if (ParameterUtil.GetDoubleValueFromElementOrSymbol(element, entryMap.RevitParameterName, out m_Area) == null)
            {
                ParameterUtil.GetDoubleValueFromElementOrSymbol(element, entryMap.CompatibleRevitParameterName, out m_Area);
            }
            if (m_Area > MathUtil.Eps() * MathUtil.Eps())
            {
                return(true);
            }

            m_Area = UnitUtil.ScaleArea(ExporterIFCUtils.ComputeRoofProjectedArea(element));
            return(m_Area > MathUtil.Eps() * MathUtil.Eps());
        }
示例#4
0
 /// <summary>
 /// Calculates total area for a roof
 /// </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)
 {
     m_Area = UnitUtil.ScaleArea(ExporterIFCUtils.ComputeRoofProjectedArea(element));
     return(m_Area > MathUtil.Eps() * MathUtil.Eps());
 }