com.sun.electric.tool.routing
Class VerticalRoute

java.lang.Object
  extended by com.sun.electric.tool.routing.VerticalRoute

public class VerticalRoute
extends java.lang.Object

Class to route vertically (in Z direction) between two RouteElements. The class is used as following:

After creating the object, call specifyRoute() to find a way to connect between startRE and endRE RouteElement objects. At this point you may wish to use the information about the specified route before actually building the route. Right now the only useful information that is exported is the start and end ArcProtos used, if not already specified.

Once satisfied with the specification, call buildRoute() to create all the RouteElements that determine exactly what the route will look like. Note that this does not actually create any objects, it just creates a Route, which can then be used to create Electric database objects.

There are two forms of build route, the first tries to figure out everything for you (contact sizes, arc angles), and connects to startRE and endRE if given. The second just creates RouteElements from the specification, and you need to give it the contact size and arc angle, and it does not connect to startRE or endRE.


Method Summary
 Route buildRoute(Cell cell, java.awt.geom.Point2D location, Dimension2D contactSize, int arcAngle, PolyMerge stayInside)
          Builds a Route using the specification from specifyRoute(), but without connecting to startRE and endRE.
 ArcProto getEndArc()
          Get the arc used to end the vertical route to endRE
 ArcProto getStartArc()
          Get the arc used to start the vertical route from startRE
 boolean isSpecificationSucceeded()
          See if specification succeeded and VerticalRoute contains a valid specification
static VerticalRoute newRoute(PortProto startPort, ArcProto endArc)
          Create new VerticalRoute object to route between startRE and endArc
static VerticalRoute newRoute(PortProto startPort, PortProto endPort)
          Create new VerticalRoute object to route between startRE and endRE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newRoute

public static VerticalRoute newRoute(PortProto startPort,
                                     PortProto endPort)
Create new VerticalRoute object to route between startRE and endRE

Parameters:
startPort - the start port of the route
endPort - the end port of the route

newRoute

public static VerticalRoute newRoute(PortProto startPort,
                                     ArcProto endArc)
Create new VerticalRoute object to route between startRE and endArc

Parameters:
startPort - the start port of the route
endArc - and arc the end of the route will be able to connect to

getStartArc

public ArcProto getStartArc()
Get the arc used to start the vertical route from startRE

Returns:
the start arc, or null if route could not be found or not created

getEndArc

public ArcProto getEndArc()
Get the arc used to end the vertical route to endRE

Returns:
the end arc, or null if route could not be found or not created

isSpecificationSucceeded

public boolean isSpecificationSucceeded()
See if specification succeeded and VerticalRoute contains a valid specification

Returns:
true if succeeded, false otherwise.

buildRoute

public Route buildRoute(Cell cell,
                        java.awt.geom.Point2D location,
                        Dimension2D contactSize,
                        int arcAngle,
                        PolyMerge stayInside)
Builds a Route using the specification from specifyRoute(), but without connecting to startRE and endRE. The start of the returned Route can connect to startRE, and the end of the returned Route can connect to endRE. The caller must handle the final connections.

Parameters:
cell - the Cell in which to create the route
location - where in the database the vertical route is to be created
contactSize - the size of contacts
arcAngle - angle of zero length arcs created between contacts (usually zero)
stayInside - a polygonal area in which the new arc must reside (if not null).
Returns:
a Route whose start can connect to startRE and whose end can connect to endRE. Returns null if no specification for the route exists.