/// <summary> /// Generate a preview or a wire route from a joint to an end terminal. /// </summary> /// <param name="joint">The joint to start the preview.</param> /// <param name="userHint">The user hint for the direction they want the wire to route.</param> /// <param name="terminal">The end terminal of the wire.</param> /// <param name="isBranchingOperation"> Is the start joint a branch of already routed wire</param> /// <param name="retainPreviousRoute"> Indicates if the userHint's direction must be the enddirection.</param> public IList <DiagramPoint> PreviewRouteWireToTerminal(WireJoint joint, WireRouteHint userHint, WireableTerminal terminal, bool isBranchingOperation, bool retainPreviousRoute) { var point = terminal.HotspotDiagramPoint; SMPoint p = point.TransformTo(joint.Wire.Diagram).Point; double dx = p.X - joint.X; double dy = p.Y - joint.Y; // if the points are on top of each other do nothing if (WireJoint.JointEqual((float)dx, 0) && WireJoint.JointEqual((float)dy, 0)) { return(new List <DiagramPoint>()); } return(new List <DiagramPoint>(new[] { point })); }
public void VisitWireableTerminal(WireableTerminal wireableTerminal) { throw new NotImplementedException(); }
/// <summary> /// Get a hint for the direction(s) a wire can take from a terminal. /// </summary> /// <param name="terminal">The terminal.</param> /// <returns>The hint.</returns> public WireRouteHint GetWireRouteHintFromTerminal(WireableTerminal terminal) { return(new WireRouteHint(WireRouteDirections.West)); }