1include <BOSL2/std.scad>
 2include <BOSL2/gears.scad>
 3include <BOSL2/beziers.scad>
 4include <BOSL2/screws.scad>
 5include <BOSL2/cubetruss.scad>
 6
 7$fa=1;
 8$fs=1;
 9
10xdistribute(50) {
11	recolor("#f77")
12	diff("hole")
13	cuboid([45,45,10], chamfer=10, edges=[RIGHT+BACK,RIGHT+FRONT], anchor=FRONT) {
14		tag("hole")cuboid([30,30,11], chamfer=5, edges=[RIGHT+BACK,RIGHT+FRONT]);
15		attach(FRONT,BACK, overlap=5) {
16			diff("hole2")
17			cuboid([45,45,10], rounding=15, edges=[RIGHT+BACK,RIGHT+FRONT]) {
18				tag("hole2")cuboid([30,30,11], rounding=10, edges=[RIGHT+BACK,RIGHT+FRONT]);
19			}
20		}
21	}
22
23    recolor("#7f7")
24	bevel_gear(pitch=8, teeth=20, face_width=12, shaft_diam=25, pitch_angle=45, slices=12, spiral_angle=30);
25
26	x = 18;
27	y = 20;
28	s1 = 25;
29	s2 = 20;
30	sbez = [
31		            [-x,-y], [-x,-y-s1],
32		[ x,-y-s1], [ x,-y], [ x,-y+s2],
33		[-x, y-s2], [-x, y], [-x, y+s1],
34		[ x, y+s1], [ x, y]
35	];
36	recolor("#99f")
37	path_sweep(regular_ngon(n=3,d=10,spin=90), bezpath_curve(sbez));
38
39	recolor("#0bf")
40	translate([-15,-35,0])
41	cubetruss_corner(size=10, strut=1, h=1, bracing=false, extents=[3,8,0,0,0], clipthick=0);
42
43	recolor("#777")
44	xdistribute(24) {
45		screw("M12,70", head="hex", anchor="origin", orient=BACK)
46			attach(BOT,CENTER)
47				nut("M12", thickness=10);
48		screw("M12,70", head="hex", anchor="origin", orient=BACK)
49			attach(BOT,CENTER)
50				nut("M12", thickness=10);
51	}
52}