play by eye
cut your deired lenght of PVC (2 the same length)and screw it onto a a long piece of wood that is the width and the length of the PVC then cut like 4 pieces of wood to the desired height and then screw those pieces into the piece you srcrewed to PVC into then take another piece of wood same length as the PVC and screw it into the 4 supporting beams you just screwed in and the put plywood on the sides and screw in on the bottom bottom supports wide though that il keep it sturddy thats what i did for my rail and its as sturdy as hell and it works great
id sugest drawing it out on grid papper before buyinh all the wood so you dont buy to much or to little.
peace out