Пример #1
0
# Rebuild network
netedit.rebuildNetwork()

# zoom in central node
netedit.zoomIn(match.getTarget().offset(325, 225), 10)

# set crossing mode
type("r")

# select central node
click(match.getTarget().offset(325, 225))

# select two left edges and create crossing in edges 3 and 7
click(match.getTarget().offset(150, 200))
click(match.getTarget().offset(150, 250))
netedit.createCrossing(match)
netedit.rebuildNetwork()

# create manual crossing
netedit.modifyCrossingEdges(match, "1 5")
netedit.createCrossing(match)
netedit.rebuildNetwork()

# try to create again the same crossing (cannot be possible, show warning instead)
netedit.modifyCrossingEdges(match, "1 5")
netedit.createCrossing(match)
netedit.rebuildNetwork()

# create single crossing
netedit.modifyCrossingEdges(match, "4")
netedit.createCrossing(match)
Пример #2
0
# zoom in central node
netedit.setZoom("50", "50", "50")

# Rebuild network
netedit.rebuildNetwork()

# set crossing mode
netedit.crossingMode()

# select central node
netedit.leftClick(match, 325, 225)

# select two left edges and create crossing in edges 3 and 7
netedit.leftClick(match, 150, 200)
netedit.leftClick(match, 150, 250)
netedit.createCrossing()
netedit.rebuildNetwork()

# select two right edges and create crossing in edges 4 and 8
netedit.leftClick(match, 500, 200)
netedit.leftClick(match, 500, 250)
netedit.createCrossing()
netedit.rebuildNetwork()

# Check undo redo
netedit.undo(match, 2)
netedit.redo(match, 2)

# save network
netedit.saveNetwork()
Пример #3
0
# Rebuild network
netedit.rebuildNetwork()

# zoom in central node
netedit.zoomIn(match.getTarget().offset(325, 225), 10)

# set crossing mode
type("r")

# select central node
click(match.getTarget().offset(325, 225))

# select two left edges and create crossing in edges 3 and 7
click(match.getTarget().offset(150, 200))
click(match.getTarget().offset(150, 250))
netedit.createCrossing(match)
netedit.rebuildNetwork()

# create manual crossing
netedit.modifyCrossingEdges(match, "1 5")
netedit.createCrossing(match)
netedit.rebuildNetwork()

# try to create again the same crossing (cannot be possible, show warning instead)
netedit.modifyCrossingEdges(match, "1 5")
netedit.createCrossing(match)
netedit.rebuildNetwork()

# create single crossing
netedit.modifyCrossingEdges(match, "4")
netedit.createCrossing(match)