def getNonIntersectingGridPointLine(gridPointInsetX, isJunctionWide, paths, pixelTable, yIntersectionPath, width):
 pointIndexPlusOne = yIntersectionPath.getPointIndexPlusOne()
 path = yIntersectionPath.getPath(paths)
 begin = path[yIntersectionPath.pointIndex]
 end = path[pointIndexPlusOne]
 plusMinusSign = getPlusMinusSign((end.real - begin.real))
 if isJunctionWide:
  gridPointXFirst = complex((yIntersectionPath.gridPoint.real - (plusMinusSign * gridPointInsetX)), yIntersectionPath.gridPoint.imag)
  gridPointXSecond = complex((yIntersectionPath.gridPoint.real + (plusMinusSign * gridPointInsetX)), yIntersectionPath.gridPoint.imag)
  if isAddedPointOnPathFree(path, pixelTable, gridPointXSecond, pointIndexPlusOne, width):
   if isAddedPointOnPathFree(path, pixelTable, gridPointXFirst, pointIndexPlusOne, width):
    return [gridPointXSecond, gridPointXFirst]
   if isAddedPointOnPathFree(path, pixelTable, yIntersectionPath.gridPoint, pointIndexPlusOne, width):
    return [gridPointXSecond, yIntersectionPath.gridPoint]
   return [gridPointXSecond]
 if isAddedPointOnPathFree(path, pixelTable, yIntersectionPath.gridPoint, pointIndexPlusOne, width):
  return [yIntersectionPath.gridPoint]
 return []

def getNonIntersectingGridPointLine ( gridPointInsetX , isJunctionWide , paths , pixelTable , yIntersectionPath , width ) : pointIndexPlusOne = yIntersectionPath . getPointIndexPlusOne ( ) path = yIntersectionPath . getPath ( paths ) begin = path [ yIntersectionPath . pointIndex ] end = path [ pointIndexPlusOne ] plusMinusSign = getPlusMinusSign ( ( end . real - begin . real ) ) if isJunctionWide : gridPointXFirst = complex ( ( yIntersectionPath . gridPoint . real - ( plusMinusSign * gridPointInsetX ) ) , yIntersectionPath . gridPoint . imag ) gridPointXSecond = complex ( ( yIntersectionPath . gridPoint . real + ( plusMinusSign * gridPointInsetX ) ) , yIntersectionPath . gridPoint . imag ) if isAddedPointOnPathFree ( path , pixelTable , gridPointXSecond , pointIndexPlusOne , width ) : if isAddedPointOnPathFree ( path , pixelTable , gridPointXFirst , pointIndexPlusOne , width ) : return [ gridPointXSecond , gridPointXFirst ] if isAddedPointOnPathFree ( path , pixelTable , yIntersectionPath . gridPoint , pointIndexPlusOne , width ) : return [ gridPointXSecond , yIntersectionPath . gridPoint ] return [ gridPointXSecond ] if isAddedPointOnPathFree ( path , pixelTable , yIntersectionPath . gridPoint , pointIndexPlusOne , width ) : return [ yIntersectionPath . gridPoint ] return [ ]
get the points around the grid point that is junction wide that do not intersect .