How to use open corners to move the respective segment orthogonally to its orientation through a python script

How to use open corners to move the respective segment orthogonally to its orientation through a python script