Routing is the process of finding a path between two points, which strives not to cross any obstacles and also tries to obey certain aesthetic criteria (such as minimum number of turns, port orientation, etc.).
Routing works with three cornerstone objects: routable connector, obstacle shapes, and router. A routable connector tries to avoid the current set of obstacle shapes (residing in the page) by obtaining routing points from the router. The router is responsible for creating and maintaining a routing graph for the current set of obstacle shapes existing on the page.
A routable connector can be automatically rerouted in three modes:
- Never - the connector is never automatically rerouted. You can still reroute the route by executing the Reroute command (from the context menu or from code)
- Always - the connector is automatically rerouted when any of the obstacles have changed (i.e., there is a possibility for the route to be rerouted in a better way).
- When needed - the connector is automatically rerouted when an obstacle is placed on it (i.e., the route needs to be rerouted because it crosses an obstacle).