Draw line on mid of any polyline

Hello everyone!
I need to draw thickness marking on a poly-line. And it would be so nice if I could choose which direction and length of marking line from middle point.