Rotate your cost raster (DEM) by 45 degrees using any point in the middle.
Set env. extent and cell size to ROTATED. Derive rows and columns rasters using technique described here.
Call rasters accordingly and find diagonal cells:
I used 1261 here because max(COLUMNS)=1260 in my case. Number must be odd. Make sure output looks like that:
Modify ROTATED using:
arcpy.gp.RasterCalculator_sa('Con("chessboard" == 1,"ROTATED","ROTATED"+10)', "C:/SCRATCH/pilars")
to force diagonal directions.
Fill PILARS, derive Flow Directions and flow paths. Use flow direction to convert paths to polylines.
Un-rotate polylines to see:
I used this field calculator expression to un-rotate streams:
from math import sin, cos
def RotateLine(x0,y0, shp):
for i in range(len(part)):
x,y = p.X-x0, p.Y-y0
RotateLine( !POINT_X!, !POINT_Y!, !Shape! )
But I am sure you can find better tools. You'll need it to rotated you other shapes by 45 degrees at the very beginning.
More elegant solution possible for predefined outlets.