use ; n1 = 6; n2 = 24; mm_per_tooth = 4; //all meshing gears need the same mm_per_tooth (and the same pressure_angle) thickness = 2; hole = 4; height = 12; // Rack with dimensions sized to fit switch setup translate([0,-20,0]) rack(mm_per_tooth,n2,3,6); // Create gear with square axle for coupling to spring gear(mm_per_tooth,n2,thickness,hole); $fn=30; h=4; translate([0,0,thickness/2]) difference(){ translate([-2.5,-2.5,0]) cube([5,5,h]); cylinder(fn=30,r=2,h=10); }