/// <summary> /// Get the intersection of a <see cref="Structure"/> and a <see cref="Wire"/>. /// </summary> /// <param name="structure">The structure we are trying to get an intersection with.</param> /// <param name="start">The start point in the structure's parent diagram or one of its nested diagrams.</param> /// <param name="end">The end point in the structure's diagram or one of its nested diagrams.</param> /// <returns>The intersection with the structure.</returns> public StructureIntersection GetStructureIntersection(Structure structure, DiagramPoint start, DiagramPoint end) { if (structure == null) { throw new ArgumentNullException("structure"); } if (structure.Owner == null || !(structure.Owner is Diagram)) { throw new ArgumentException("The structure must be a child of a diagram", "structure"); } // this just does straight line intersection; we should walk the spline and find out where it intersects but I don't know // enough math for that. return(structure.GetIntersection(start, end, this)); }
/// <summary> /// Route the given wire in the current diagram. /// </summary> /// <param name="wire">The wire to be routed.</param> /// <param name="startDiagramPoint">The start Diagram Point, the point where the route starts.</param> /// <param name="endDiagramPoint">The end DiagramPoint, the point where the route ends.</param> /// <param name="startDirections">The hint direction from the start point.</param> /// <param name="endDirections">The hint direction to the end point.</param> /// <param name="startTerminal">The start terminal.</param> /// <param name="endTerminal">The end terminal.</param> /// <param name="purpose">Is the layout being called for cleanup wire operation or for preview operation (the later might give a very quick but rough intermediate results sometimes)</param> /// <param name="userHint">The user hint direction to the end point.</param> /// <param name="endingWireSegment">If the layout is ending on a wire then the segment on which it is ending (for merging operations)</param> /// <param name="isBranchingOperation">If the layout is branching off from an already existing wire</param> /// <returns> /// A list of diagram points that form the route. /// </returns> /// <remarks> /// Provides the routed path using the designated algorithm(if auto-routing is enabled), /// else it returns the Manhattan route"L". /// </remarks> public IList <DiagramPoint> PreviewRouteWire(Wire wire, DiagramPoint startDiagramPoint, DiagramPoint endDiagramPoint, WireRouteDirections startDirections, WireRouteDirections endDirections, Terminal startTerminal, Terminal endTerminal, WireRoutingPurpose purpose, WireRouteDirections userHint, WireSegment endingWireSegment, bool isBranchingOperation) { return(new List <DiagramPoint>()); }
public bool PassesThroughDiagram(Diagram diagram, DiagramPoint sibling1, DiagramPoint sibling2) { return(true); }
public bool IsKeyDiagramPointInBetween(DiagramPoint keyDiagramPoint, DiagramPoint diagramPoint1, DiagramPoint diagramPoint2) { return(true); }
/// <summary> /// Get a hint for the direction(s) a wire can take from between two points in space. /// </summary> /// <param name="startPoint"></param> /// <param name="endPoint"></param> /// <returns></returns> public WireRouteHint GetWireRouteHintFromPoints(DiagramPoint startPoint, DiagramPoint endPoint) { return(new WireRouteHint(WireRouteDirections.West)); }