I made Wall thickness & Base Thickness separate variables & fixed one bug.
This was designed to be used for the Mostly Printed CNC project, but could be used for probably any round pipe you want to drill perpendicular holes in. This made my job of drilling these pipes very easy. I used a 9/64" Drill bit for the holes. With a little more work on the openscad file, it could be adjusted to drill other angle holes in pipe. I did 2 sets of test prints on this, 1st one I used 24mm for the OD (U.S. version) of the pipe & the 2nd I used 23.7mm. 24mm was little too loose & 23.7 was a little too tight when putting both halfs together. I ended up using 1 side of 24mm & 1 side of 23.7mm to clamp nicely. 23.8mm is probably a better number to use for the OD of the pipe. Since I had printed this twice, I used the spare one to lay the other end of the pipe on. I realized after the fact, that I needed a place in the center of the jig to clamp to, but just used a small piece of wood over that open area. I changed the openscad file to give you an option of center clamp width. It will take you more time to clamp it all down than it will to actually drill the pipe.
I included the stl files for the standard 76.2mm hole spacing.
You can also open this with Thingiverse Customizer just like the Parametric Nut Trap I made. http://www.thingiverse.com/thing:907882
I updated this later the same day to rev4 for the openscad file to tweak the code a little for consistency if the user changed the bolt holes to much larger sizes. I did not update the sample stl files though as the hole patterns are the same.
Print 2 halves for your intended hole spacing. You might also want to print another half for the other end of the pipe to lay flat on.
I used 5mm for the thickness of the base as I wanted to make sure the drill bit was perpendicular before going into the pipe. I would rather use a little more plastic & than to have to re-drill the pipe.