Rich Olson writes:
ChainringGen is an OpenSCAD script I wrote that can generate a bike chainring with any specifications you like.
You can download ChainringGen here. You can control parameters like bolt-circle-diameter (BCD), number of bolt holes, number of teeth and other stuff.
I primarily created ChainringGen because I thought designing / milling my own 110 BCD 39 tooth chainring would be the most practical and economic way to obtain one.
I also wanted to explore ways I could get from an OpenSCAD design to an object created on my CNC mill. It’s a bit trickier than just exporting an STL file.
The video above includes instructions on how to use ChainringGen in conjunction with other open-source tools to actually make a chainring out of 7075 aluminum using an inexpensive CNC mill.
More details at Nothinglabs project page.
Via the contact form.

What the heck is a “Chainring”? Some sort of Google Translate abortion? On my planet we call these “Sprockets”:
https://en.wikipedia.org/wiki/Sprocket
Drone, those large sprockets for bicycle cranksets are also called chainrings. Nothing wrong with that… Oh, not forgetting a Wikipedia article link: http://en.wikipedia.org/wiki/Crankset