9 spring_low = 1.2; // mm lower than spring_x
15 translate([0, -spring_y/2, 0]) cube([wall, spring_y, spring_z]);
18 for (i = [-1,1]) scale([1, i, 1])
19 translate([0, spring_y/2 - wall, 0])
20 cube([spring_x, wall, spring_z]);
23 translate([0, -clip_w/2, 0]) cube([wall, clip_w, spring_z + clip_add_z]);
26 spring_y_off = spring_y/4;
31 translate([spring_x - wall, -spring_y/2, 0])
32 cube([wall, spring_y, spring_z]);
33 // round bottom of the spring
35 translate([spring_top_r+spring_x- wall- spring_low,
37 cylinder(r = spring_top_r, h = spring_z,
42 translate([spring_x, -infty/2, -infty/2]) cube(infty);
43 translate([spring_x - 1, 0, -eps]) scale([0.8, 1, 1]) cylinder(r = 2.5, h = spring_z + 2*eps, $fn = 128);
47 for (i = [-1, 1]) scale([1, i, 1])
48 translate([-infty/2, spring_y/2, -infty/2]) cube(infty);
50 // round top of the spring
52 translate([spring_top_r+spring_x- wall- spring_low,
53 i*spring_y_off, -eps])
54 cylinder(r = spring_top_r - wall, h = spring_z + 2*eps,
58 // color("red") translate([23.5, 0, 0]) cylinder(r = 18, h = spring_z);