Fit rectangle parallel to line


I feel like there is a very simple solution to this, but I just can’t find it. So I’m trying to to make the rectangles fit parallel to the lines, like the blue squares shown. I was going to find the distance between both of the lines then rotate them all, but thought there might be a more straightforward solution. Any help appreciated, thanks.

1 Like

Thanks, this helped a lot!