Inspired by Trobinou's combination square (https://www.thingiverse.com/thing:1905410). I redesign the tappered parts so that they are printable. Four additional M3x0.5 10mm bolts and nuts are required to fix them on base. The ring to hold bubble level is also redesigned so that it is easier to be printed.
The usage is simple: Rotate the printed bolt counter-clockwise to release ruler for movement. Move the ruler to the target location and then screw the bolt clockwise to fix the ruler. Notice that the four M3 bolts can be used to adjust the force to hold the ruler.
0.15mm layer height is okay for the base and 0.1mm is recommend for screw.
You might need to sander the prints to remove unwanted particles/defects so that the vertical surface is smooth enough.
When assembling bubble levels, place the square base on a desktop. You can level the desktop by using your smartphone's Level App. Then, rotate the two bubble levels until the bubble is at the center of the two dark lines. After that, apply some glue on the side edge of bubble levels to fix them.