This is a printable version of the discontinued Park Tool product CDG-2, seen here: https://www.parktool.com/en-us/product/chainring-diameter-gauge-cdg-2
Use it to identify the bolt pattern used on the chain rings on any kind of bike, either 4-bolt or 5-bolt pattern rings. The gauge shows the bolt circle diameter using the slots in the swing arm and the center-to-center distance between the holes being measured with the tick marks on the outer edge.
The two flat plates are modeled in OpenSCAD because of the non-linear relationship between center-to-center distance and angle. The two pins are modeled in FreeCAD for simple modeled threads. The whole thing is assembled with M4 countersunk socket head screws anywhere from 8 to 12mm long. If you are in the US, BoltDepot is a great resource: https://www.boltdepot.com/Product-Details.aspx?product=15681
I printed the gauge using a two-color print to highlight the annotations. The plates are just 2.5mm thick, and PLA is totally fine if you will store the tool somewhere that stays near room temperatures. If you need to keep it in a hot shed or garage, consider PETG or ABS so the tool retains dimensional accuracy better when exposed to heat.
The author hasn't provided the model origin yet.