protected override void setJSON(JObject obj, BaseClassIfc host, HashSet<int> processed)
{
base.setJSON(obj, host, processed);
obj["Points"] = Points.getJson(this, processed);
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.mA + " " + ai.mB + " " + ai.mC;
}
else
{
IfcLineIndex li = seg as IfcLineIndex;
jobj["IfcLineIndex"] = string.Join(" ", li.mIndices.ConvertAll(x => x.ToString()));
}
array.Add(jobj);
}
}
if (mSelfIntersect != IfcLogicalEnum.UNKNOWN)
obj["SelfIntersect"] = mSelfIntersect.ToString();
}