How to achieve pipeline flow by line


I want to achieve pipeline flow like this


It can be set to flow direction, rotated, and set line segment thickness.
I tried to use img, but it could not be set line segment thickness and rotated.
Please tell me how to implement it.

I dont test only my tip, create image with line and space one thickness.
Create obj filled with tiled image.
Create horizontal animation. Simmilar for vertical.
Angled is more complicated.