示例#1
0
 internal static void parseFields(IfcQuantityWeight q, List <string> arrFields, ref int ipos, ReleaseVersion schema)
 {
     IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos); q.mWeightValue = ParserSTEP.ParseDouble(arrFields[ipos++]); if (schema != ReleaseVersion.IFC2x3)
     {
         q.mFormula = arrFields[ipos++].Replace("'", "");
     }
 }
示例#2
0
 internal static void parseFields(IfcQuantityTime q, List <string> arrFields, ref int ipos, Schema schema)
 {
     IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos); q.mTimeValue = int.Parse(arrFields[ipos++]); if (schema != Schema.IFC2x3)
     {
         q.mFormula = arrFields[ipos++].Replace("'", "");
     }
 }
示例#3
0
        internal static void parseFields(IfcQuantityLength q, List <string> arrFields, ref int ipos, ReleaseVersion schema)
        {
            IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos);
            string str = arrFields[ipos++];

            if (!double.TryParse(str, out q.mLengthValue))
            {
                if (str.StartsWith("IFCLENGTHMEASURE"))
                {
                    str = str.Substring(17, str.Length - 18);
                    double.TryParse(str, out q.mLengthValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = arrFields[ipos++].Replace("'", "");
            }
        }
示例#4
0
        internal static void parseFields(IfcQuantityArea q, List <string> arrFields, ref int ipos, ReleaseVersion schema)
        {
            IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos);
            string str = arrFields[ipos++];

            if (!double.TryParse(str, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out q.mAreaValue))
            {
                if (str.StartsWith("IFCAREAMEASURE"))
                {
                    str = str.Substring(15, str.Length - 16);
                    double.TryParse(str, out q.mAreaValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = arrFields[ipos++].Replace("'", "");
            }
        }
示例#5
0
        internal static void parseFields(IfcQuantityVolume q, List <string> arrFields, ref int ipos, ReleaseVersion schema)
        {
            IfcPhysicalSimpleQuantity.parseFields(q, arrFields, ref ipos);
            string str = arrFields[ipos++];
            double vol;

            if (double.TryParse(str, out vol))
            {
                q.mVolumeValue = vol;
            }
            else
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(str);
                if (mv != null)
                {
                    q.mVolumeValue = mv.Measure;
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = arrFields[ipos++].Replace("'", "");
            }
        }