Inheritance: GeometryGym.Ifc.IfcPhysicalSimpleQuantity
Exemple #1
0
        internal static IfcQuantityVolume Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityVolume q = new IfcQuantityVolume();
            int pos = 0, len = str.Length;

            q.Parse(str, ref pos, len);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, out q.mVolumeValue))
            {
                IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
                if (mv != null)
                {
                    q.mVolumeValue = mv.Measure;
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
            return(q);
        }
Exemple #2
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("'", "");
            }
        }
Exemple #3
0
 internal IfcQuantityVolume(DatabaseIfc db, IfcQuantityVolume q) : base(db, q)
 {
     mVolumeValue = q.mVolumeValue; mFormula = q.mFormula;
 }
Exemple #4
0
 internal static IfcQuantityVolume Parse(string str, ReleaseVersion schema)
 {
     IfcQuantityVolume q = new IfcQuantityVolume();
     int pos = 0, len = str.Length;
     q.Parse(str, ref pos, len);
     string s = ParserSTEP.StripField(str, ref pos, len);
     if (!double.TryParse(s, out q.mVolumeValue))
     {
         IfcMeasureValue mv = ParserIfc.parseMeasureValue(s);
         if (mv != null)
             q.mVolumeValue = mv.Measure;
     }
     if (schema != ReleaseVersion.IFC2x3)
         q.mFormula = ParserSTEP.StripString(str, ref pos, len);
     return q;
 }
Exemple #5
0
 internal IfcQuantityVolume(DatabaseIfc db, IfcQuantityVolume q)
     : base(db,q)
 {
     mVolumeValue = q.mVolumeValue; mFormula = q.mFormula;
 }
Exemple #6
0
		internal static IfcQuantityVolume Parse(string strDef, Schema schema) { IfcQuantityVolume q = new IfcQuantityVolume(); int ipos = 0; parseFields(q, ParserSTEP.SplitLineFields(strDef), ref ipos, schema); return q; }
Exemple #7
0
		internal static void parseFields(IfcQuantityVolume q, List<string> arrFields, ref int ipos, Schema 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 != Schema.IFC2x3)
				q.mFormula = arrFields[ipos++].Replace("'", "");
		}
Exemple #8
0
		internal IfcQuantityVolume(IfcQuantityVolume q) : base(q) { mVolumeValue = q.mVolumeValue; }
Exemple #9
0
 internal static IfcQuantityVolume Parse(string strDef, ReleaseVersion schema)
 {
     IfcQuantityVolume q = new IfcQuantityVolume(); int ipos = 0; parseFields(q, ParserSTEP.SplitLineFields(strDef), ref ipos, schema); return(q);
 }
Exemple #10
0
 internal IfcQuantityVolume(IfcQuantityVolume q) : base(q)
 {
     mVolumeValue = q.mVolumeValue;
 }