/// <inheritdoc /> protected override ILayoutAlgorithm CreateConfiguredLayout(GraphControl graphControl) { var router = new ChannelEdgeRouter(); var orthogonalPatternEdgeRouter = new OrthogonalPatternEdgeRouter(); orthogonalPatternEdgeRouter.AffectedEdgesDpKey = ChannelEdgeRouter.AffectedEdgesDpKey; orthogonalPatternEdgeRouter.MinimumDistance = MinimumDistanceItem; orthogonalPatternEdgeRouter.GridRouting = ActivateGridRoutingItem; orthogonalPatternEdgeRouter.GridSpacing = GridSpacingItem; orthogonalPatternEdgeRouter.BendCost = BendCostItem; orthogonalPatternEdgeRouter.EdgeCrossingCost = EdgeCrossingCostItem; orthogonalPatternEdgeRouter.NodeCrossingCost = NodeCrossingCostItem; // disable edge overlap costs when Edge distribution will run afterwards anyway orthogonalPatternEdgeRouter.EdgeOverlapCost = 0; router.PathFinderStrategy = orthogonalPatternEdgeRouter; var segmentDistributionStage = new OrthogonalSegmentDistributionStage(); segmentDistributionStage.AffectedEdgesDpKey = ChannelEdgeRouter.AffectedEdgesDpKey; segmentDistributionStage.PreferredDistance = MinimumDistanceItem; segmentDistributionStage.GridRouting = ActivateGridRoutingItem; segmentDistributionStage.GridSpacing = GridSpacingItem; router.EdgeDistributionStrategy = segmentDistributionStage; return(router); }
private void createRouter() { if (router != null) { return; } router = new ChannelEdgeRouter(); }
private PartitionLayout.IInterEdgeRouter ConfigureInterEdgeRouter() { OptionGroup topLevelGroup = Handler.GetGroupByName(TOP_LEVEL); PartitionLayout.IInterEdgeRouter interEdgeRouter; if (topLevelGroup[PATH_FINDER].Value.Equals(ORTHOGONAL_PATTERN_PATH_FINDER)) { OrthogonalPatternEdgeRouter oper = new OrthogonalPatternEdgeRouter(); oper.MinimumDistance = (double)topLevelGroup[MINIMUM_DISTANCE].Value; oper.EdgeCrossingCost = (double)topLevelGroup[EDGE_CROSSING_COST].Value; oper.NodeCrossingCost = (double)topLevelGroup[NODE_CROSSING_COST].Value; oper.BendCost = (double)topLevelGroup[BEND_COST].Value; var channelEdgeRouter = new ChannelEdgeRouter(); channelEdgeRouter.PathFinderStrategy = oper; interEdgeRouter = PartitionLayout.CreateChannelInterEdgeRouter(channelEdgeRouter); } else { interEdgeRouter = PartitionLayout.CreateChannelInterEdgeRouter(); } interEdgeRouter.RouteInterEdgesOnly = !(bool)(topLevelGroup.GetItemByName(ROUTE_ALL_EDGES).Value); return(interEdgeRouter); }