protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
 {
     base.setJSON(obj, host, options);
     obj["Points"] = Points.getJson(this, options);
     if (mSegments.Count > 0)
     {
         JArray array = new JArray();
         obj["Segments"] = array;
         foreach (IfcSegmentIndexSelect seg in Segments)
         {
             IfcArcIndex ai   = seg as IfcArcIndex;
             JObject     jobj = new JObject();
             if (ai != null)
             {
                 jobj["IfcArcIndex"] = ai[0] + " " + ai[1] + " " + ai[2];
             }
             else
             {
                 IfcLineIndex li = seg as IfcLineIndex;
                 jobj["IfcLineIndex"] = string.Join(" ", li.ConvertAll(x => x.ToString()));
             }
             array.Add(jobj);
         }
     }
     if (mSelfIntersect != IfcLogicalEnum.UNKNOWN)
     {
         obj["SelfIntersect"] = mSelfIntersect.ToString();
     }
 }
 internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <string, XmlElement> processed)
 {
     base.SetXML(xml, host, processed);
     xml.AppendChild(Points.GetXML(xml.OwnerDocument, "Points", this, processed));
     if (mSegments.Count > 0)
     {
         XmlElement element = xml.OwnerDocument.CreateElement("Segments", mDatabase.mXmlNamespace);
         xml.AppendChild(element);
         foreach (IfcSegmentIndexSelect seg in Segments)
         {
             XmlElement s = xml.OwnerDocument.CreateElement(seg.GetType().Name + "-wrapper", mDatabase.mXmlNamespace);
             element.AppendChild(s);
             IfcArcIndex ai = seg as IfcArcIndex;
             if (ai != null)
             {
                 s.InnerText = ai[0] + " " + ai[1] + " " + ai[2];
             }
             else
             {
                 IfcLineIndex li = seg as IfcLineIndex;
                 s.InnerText = string.Join(" ", li.ConvertAll(x => x.ToString()));
             }
         }
     }
 }