392 Router(
const unsigned int flags);
453 void setTransactionUse(
const bool transactions);
462 bool transactionUse(
void)
const;
479 bool processTransaction(
void);
516 const bool first_move =
false);
535 void moveShape(
ShapeRef *shape,
const double xDiff,
const double yDiff);
563 void deleteConnector(
ConnRef *connector);
597 void moveJunction(
JunctionRef *junction,
const double xDiff,
627 const double value = chooseSensibleParamValue);
662 const double penVal = chooseSensibleParamValue);
682 void outputInstanceToSVG(std::string filename = std::string());
694 virtual unsigned int newObjectId(
void)
const;
703 bool objectIdIsUnused(
const unsigned int id)
const;
743 virtual bool shouldContinueTransactionWithProgress(
744 unsigned int elapsedTime,
unsigned int phaseNumber,
745 unsigned int totalPhases,
double proportion);
763 newAndDeletedObjectListsFromHyperedgeImprovement(
void)
const;
770 void processActions(
void);
773 void attachedShapes(
IntList &shapes,
const unsigned int shapeId,
774 const unsigned int type);
775 void attachedConns(
IntList &conns,
const unsigned int shapeId,
776 const unsigned int type);
777 void markPolylineConnectorsNeedingReroutingForDeletedObstacle(
779 void generateContains(
VertInf *pt);
780 void printInfo(
void);
781 void regenerateStaticBuiltGraph(
void);
782 void destroyOrthogonalVisGraph(
void);
783 void setStaticGraphInvalidated(
const bool invalidated);
785 bool isInCrossingPenaltyReroutingStage(
void)
const;
786 void markAllObstaclesAsMoved(
void);
788 void performContinuationCheck(
unsigned int phaseNumber,
789 size_t stepNumber,
size_t totalSteps);
790 void registerSettingsChange(
void);
800 void improveOrthogonalTopology(
void);
803 bool existsOrthogonalSegmentOverlap(
const bool atEnds =
false);
804 bool existsOrthogonalFixedSegmentOverlap(
const bool atEnds =
false);
805 bool existsOrthogonalTouchingPaths(
void);
806 int existsCrossings(
const bool optimisedForConnectorType =
false);
807 bool existsInvalidOrthogonalPaths(
void);
813 void outputDiagramSVG(std::string instanceName = std::string(),
816 void outputDiagramText(std::string instanceName = std::string());
817 void outputDiagram(std::string instanceName = std::string());
832 unsigned int assignId(
const unsigned int suggestedId);
836 void modifyConnector(
ConnRef *conn);
837 void modifyConnector(
ConnRef *conn,
unsigned int type,
838 const ConnEnd &connEnd,
bool connPinUpdate =
false);
841 void removeObjectFromQueuedActions(
const void *
object);
842 void newBlockingShape(
const Polygon& poly,
int pid);
843 void checkAllBlockedEdges(
int pid);
844 void checkAllMissingEdges(
void);
845 void adjustContainsWithAdd(
const Polygon& poly,
const int p_shape);
846 void adjustContainsWithDel(
const int p_shape);
848 const int p_cluster);
849 void adjustClustersWithDel(
const int p_cluster);
850 void rerouteAndCallbackConnectors(
void);
851 void improveCrossings(
void);
The ClusterRef class represents a cluster object.
The ConnEnd class represents different possible endpoints for connectors.
The ConnRef class represents a connector object.
ConnRerouteFlagDelegate()
~ConnRerouteFlagDelegate()
std::list< std::pair< ConnRef *, bool > > m_mapping
bool * addConn(ConnRef *conn)
void removeConn(ConnRef *conn)
The HyperedgeRerouter class is a convenience object that can be used to register hyperedges to be rer...
The JunctionRef class represents a fixed or free-floating point that connectors can be attached to.
The Point class defines a point in the plane.
A common interface used by the Polygon classes.
A dynamic Polygon, to which points can be easily added and removed.
The Router class represents a libavoid router instance.
TopologyAddonInterface * m_topology_addon
bool m_static_orthogonal_graph_invalidated
HyperedgeImprover m_hyperedge_improver
unsigned int m_largest_assigned_id
DebugHandler * m_debug_handler
ClusterRefList clusterRefs
bool m_consolidate_actions
bool m_allows_orthogonal_routing
bool m_in_crossing_rerouting_stage
ContainsMap enclosingClusters
ConnRerouteFlagDelegate m_conn_reroute_flags
ActionInfoList actionList
clock_t m_transaction_start_time
bool m_allows_polyline_routing
bool m_currently_calling_destructors
HyperedgeRerouter m_hyperedge_rerouter
The ShapeConnectionPin class represents a fixed point or "pin" on a shape that can be connected to.
The ShapeRef class represents a shape object.
virtual bool outputDeletionCode(FILE *fp) const
virtual ~TopologyAddonInterface()
virtual void improveOrthogonalTopology(Router *router)
virtual TopologyAddonInterface * clone(void) const
virtual bool outputCode(FILE *fp) const
Contains the interface for the ConnRef class.
void outputDiagram(Avoid::Router *router)
Contains the interface for the HyperedgeRerouter class.
libavoid: Object-avoiding orthogonal and polyline connector routing library.
static const unsigned int runningTo
std::map< VertID, ShapeSet > ContainsMap
ConnType
Describes the type of routing that is performed for each connector.
TransactionPhases
Types of routing phases reported by Router::shouldContinueTransactionWithProgress().
@ TransactionPhaseOrthogonalNudgingY
Orthogonal edge segments are nudged apart in the y-dimension.
@ TransactionPhaseOrthogonalVisibilityGraphScanX
The orthogonal visibility graph is built by conducting a scan in each dimension.
@ TransactionPhaseRouteSearch
Initial routes are searched for in the visibility graph.
@ TransactionPhaseCrossingDetection
With crossing penalties enabled, crossing detection is performed to find all crossings.
@ TransactionPhaseCompleted
Not a real phase, but represents the router is finished (or has aborted) the transaction and you may ...
@ TransactionPhaseRerouteSearch
Crossing connectors are rerouted to search for better routes.
@ TransactionPhaseOrthogonalVisibilityGraphScanY
The orthogonal visibility graph is built by conducting a scan in each dimension.
@ TransactionPhaseOrthogonalNudgingX
Orthogonal edge segments are nudged apart in the x-dimension.
std::list< unsigned int > IntList
std::list< Obstacle * > ObstacleList
std::list< LineRep > LineReps
std::list< ActionInfo > ActionInfoList
static const unsigned int runningFrom
std::list< ClusterRef * > ClusterRefList
static const double zeroParamValue
RoutingParameter
Types of routing parameters and penalties that can be used to tailor the style and improve the qualit...
@ lastRoutingParameterMarker
@ crossingPenalty
This penalty is applied whenever a connector path crosses another connector path.
@ clusterCrossingPenalty
This penalty is applied whenever a connector path crosses a cluster boundary.
@ reverseDirectionPenalty
This penalty is applied whenever a connector path travels in the direction opposite of the destinatio...
@ portDirectionPenalty
This penalty is applied to port selection choice when the other end of the connector being routed doe...
@ fixedSharedPathPenalty
This penalty is applied whenever a connector path shares some segments with an immovable portion of a...
@ anglePenalty
This penalty is applied in its full amount to tight acute bends in the connector path.
@ segmentPenalty
This penalty is applied for each segment in the connector path beyond the first.
@ shapeBufferDistance
This parameter defines the spacing distance that will be added to the sides of each shape when determ...
@ idealNudgingDistance
This parameter defines the spacing distance that will be used for nudging apart overlapping corners a...
RouterFlag
Flags that can be passed to the router during initialisation to specify options.
@ OrthogonalRouting
This option specifies that the router should maintain the structures necessary to allow orthogonal co...
@ PolyLineRouting
This option specifies that the router should maintain the structures necessary to allow poly-line con...
std::list< ConnRef * > ConnRefList
A list of ConnRef objects.
enum RoutingParameter PenaltyType
RoutingOption
Types of routing options that can be enabled.
@ performUnifyingNudgingPreprocessingStep
This option can be used to control whether the router performs a preprocessing step before orthogonal...
@ lastRoutingOptionMarker
@ improveHyperedgeRoutesMovingJunctions
This option causes hyperedge routes to be locally improved fixing obviously bad paths.
@ improveHyperedgeRoutesMovingAddingAndDeletingJunctions
This option causes hyperedge routes to be locally improved fixing obviously bad paths.
@ nudgeOrthogonalTouchingColinearSegments
This option can be used to control whether collinear line segments that touch just at their ends will...
@ nudgeSharedPathsWithCommonEndPoint
This option determines whether intermediate segments of connectors that are attached to common endpoi...
@ penaliseOrthogonalSharedPathsAtConnEnds
This option penalises and attempts to reroute orthogonal shared connector paths terminating at a comm...
@ nudgeOrthogonalSegmentsConnectedToShapes
This option causes the final segments of connectors, which are attached to shapes,...
static const double chooseSensibleParamValue
static const unsigned int runningToAndFrom
The HyperedgeNewAndDeletedObjectLists class stores lists of objects created and deleted during hypere...