This is a variation of a Releaux triangle which has a point that describes a perfect square when the rotor moves inside a square. This allows in principle to create a tool that drills square holes from a circular motor.
For details see
Cox, B. & Wagon, S. Drilling for Polygons The American Mathematical Monthly, 2012, 119, 300-312
and
Cox, B. & Wagon, S. Circle-Squaring: A Mechanical View The College Mathematics Journal, 2009, 40, 238-247 and
Adapt the dimensions in the .scad file to your liking. Be careful with the offset setting, too high values will result in extreme overhangs. It might be necessary to increase the size difference between the rotor and the square a bit to avoid an unmovable rotor. Too large values on the other hand prevent the two parts from being linked.
A makefile is supplied to build a stl using OpenSCAD. Slice and print to your liking.
This thing was heavily inspired by
Reuleaux Triangle for FDM by SSD http://www.thingiverse.com/thing:5456
GPL3