예제 #1
0
파일: StepObject.cs 프로젝트: seanays/CAF
 public override void SetID(IDGenerator idGenerator)
 {
     ID = idGenerator.GetID();
     EdgeStart.SetID(idGenerator);
     EdgeEnd.SetID(idGenerator);
     EdgeGeometry.SetID(idGenerator);
 }
예제 #2
0
 /// <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()));
 }
예제 #3
0
파일: IfcEdge.g.cs 프로젝트: vdubya/IFC-gen
        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()));
        }
예제 #4
0
 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));
     }
 }
예제 #5
0
 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);
     }
 }
예제 #6
0
        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();
        }
예제 #7
0
 public override int GetHashCode()
 {
     return(EdgeStart.GetHashCode() ^ EdgeEnd.GetHashCode());
 }
예제 #8
0
 /// <summary>
 ///     Gets the hash code
 /// </summary>
 /// <returns>The int</returns>
 public override int GetHashCode() => EdgeStart.GetHashCode() ^ EdgeEnd.GetHashCode();