internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "Segments") == 0) { List <IfcCompositeCurveSegment> segments = new List <IfcCompositeCurveSegment>(child.ChildNodes.Count); foreach (XmlNode cn in child.ChildNodes) { IfcCompositeCurveSegment s = mDatabase.ParseXml <IfcCompositeCurveSegment>(cn as XmlElement); if (s != null) { segments.Add(s); } } Segments = segments; } } if (xml.HasAttribute("SelfIntersect ")) { Enum.TryParse <IfcLogicalEnum>(xml.Attributes["SelfIntersect"].Value, true, out mSelfIntersect); } }
internal static void parseFields(IfcCompositeCurveSegment s, List<string> arrFields, ref int ipos) { IfcGeometricRepresentationItem.parseFields(s, arrFields, ref ipos); s.mTransition = (IfcTransitionCode)Enum.Parse(typeof(IfcTransitionCode), arrFields[ipos++].Replace(".", "")); s.mSameSense = ParserSTEP.ParseBool(arrFields[ipos++]); s.mParentCurve = ParserSTEP.ParseLink(arrFields[ipos++]); }
internal static IfcCompositeCurveSegment Parse(string strDef) { IfcCompositeCurveSegment s = new IfcCompositeCurveSegment(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return s; }
internal IfcCompositeCurveSegment(IfcCompositeCurveSegment el) : base(el) { mTransition = el.mTransition; mSameSense = el.mSameSense; mParentCurve = el.mParentCurve; }