w = 3; //mm h = 20; //mm E = 40; //mm n = 20; tolerance = 1; //mm theta = 2*atan(w/(2*h)); alpha = n/2*theta; R = sqrt(h^2+w^2/4); L = 2*R*sin(alpha)-tolerance; P = R*cos(alpha); module comb(){ union(){ for ( i = [0 : n-1] ){ rotate([0,0,-alpha+theta*i+theta/2]) translate([-w/2,0,0]) cube([w,h,L],false); } } } difference(){ translate([-L/2,0,0]) cube([L,E,L],false); translate([0,-P,0]) comb(); translate([0,0,L/2]) rotate([0,90,0]) translate([0,0,-L/2]) translate([0,h+E+P-h,0]) rotate([0,0,180]) comb(); }