internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary) { base.parse(str, ref pos, release, len, dictionary); Directrix = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCurve; string field = ParserSTEP.StripField(str, ref pos, len); if (field.StartsWith("I")) { mStartParam = ParserIfc.parseMeasureValue(field) as IfcCurveMeasureSelect; } else { double d = ParserSTEP.ParseDouble(field); if (!double.IsNaN(d)) { mStartParam = new IfcParameterValue(d); } } field = ParserSTEP.StripField(str, ref pos, len); if (field.StartsWith("I")) { mEndParam = ParserIfc.parseMeasureValue(field) as IfcCurveMeasureSelect; } else { double d = ParserSTEP.ParseDouble(field); if (!double.IsNaN(d)) { mEndParam = new IfcParameterValue(d); } } }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary) { base.parse(str, ref pos, release, len, dictionary); string s = ParserSTEP.StripField(str, ref pos, len); if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mWeightValue)) { IfcMeasureValue mv = ParserIfc.parseMeasureValue(s); if (mv != null) { mWeightValue = mv.Measure; } } if (release > ReleaseVersion.IFC2x3) { mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len)); } }
internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary) { base.parse(str, ref pos, release, len, dictionary); string s = ParserSTEP.StripField(str, ref pos, len); if (!double.TryParse(s, out mVolumeValue)) { IfcMeasureValue mv = ParserIfc.parseMeasureValue(s); if (mv != null) { mVolumeValue = mv.Measure; } } if (release != ReleaseVersion.IFC2x3) { mFormula = ParserSTEP.StripString(str, ref pos, len); } }
internal static IfcQuantityWeight Parse(string str, ReleaseVersion schema) { IfcQuantityWeight q = new IfcQuantityWeight(); 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.mWeightValue)) { IfcMeasureValue mv = ParserIfc.parseMeasureValue(s); if (mv != null) { q.mWeightValue = mv.Measure; } } if (schema != ReleaseVersion.IFC2x3) { q.mFormula = ParserSTEP.StripString(str, ref pos, len); } return(q); }
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("'", ""); } }