Arbitrary Interval Ruler
JavaScript (Node.js), 123 bytes



l=&gt;g=([p,q,...t],h='┌'.padEnd(l,'┬')+`┐
`)=&gt;p?h+g(t,h.replace(/\S/g,c=&gt;'╵│ '[c&gt;'╴'||++i%p?2:i/p%q&lt;1|0],i=-1)):h


Try it online!

Use this function as f(20)([5, 2]).



Thanks Arnauld, saves 4 bytes.