public override void SetID(IDGenerator idGenerator) { ID = idGenerator.GetID(); EdgeStart.SetID(idGenerator); EdgeEnd.SetID(idGenerator); EdgeGeometry.SetID(idGenerator); }
/// <summary> /// Returns the curve which defines the shape and spatial location of this edge. /// </summary> /// <returns>The curve which defines the shape and spatial location of this edge.</returns> public virtual Curve GetGeometry() { if (EdgeStart == null || EdgeEnd == null) { Importer.TheLog.LogError(Id, "Invalid edge", true); return(null); } return(Line.CreateBound(EdgeStart.GetCoordinate(), EdgeEnd.GetCoordinate())); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(EdgeStart != null ? EdgeStart.ToStepValue() : "$"); parameters.Add(EdgeEnd != null ? EdgeEnd.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <string, XmlElement> processed) { base.SetXML(xml, host, processed); if (mEdgeStart != null) { xml.AppendChild(EdgeStart.GetXML(xml.OwnerDocument, "EdgeStart", this, processed)); } if (mEdgeEnd != null) { xml.AppendChild(mEdgeEnd.GetXML(xml.OwnerDocument, "EdgeEnd", this, processed)); } }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); if (mEdgeStart != null) { obj["EdgeStart"] = EdgeStart.getJson(this, options); } if (mEdgeEnd != null) { obj["EdgeEnd"] = mEdgeEnd.getJson(this, options); } }
internal override void WriteXML(XmlWriter writer) { // Start Point writer.WriteStartElement("StartPoint"); EdgeStart.WriteXML(writer); writer.WriteEndElement(); // End Point writer.WriteStartElement("EndPoint"); EdgeStart.WriteXML(writer); writer.WriteEndElement(); }
public override int GetHashCode() { return(EdgeStart.GetHashCode() ^ EdgeEnd.GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>The int</returns> public override int GetHashCode() => EdgeStart.GetHashCode() ^ EdgeEnd.GetHashCode();