/ src / stems / cherry_stabilizer.scad
cherry_stabilizer.scad
 1  include <../functions.scad>
 2  
 3  // extra length to the vertical tine of the inside cherry cross
 4  // splits the stem into halves - allows easier fitment
 5  extra_vertical = 0.6;
 6  
 7  module inside_cherry_stabilizer_cross(slop) {
 8    // inside cross
 9    // translation purely for aesthetic purposes, to get rid of that awful lattice
10    translate([0,0,-SMALLEST_POSSIBLE]) {
11      linear_extrude(height = $stem_throw) {
12        square(cherry_cross(slop, extra_vertical)[0], center=true);
13        square(cherry_cross(slop, extra_vertical)[1], center=true);
14      }
15    }
16  }
17  
18  module cherry_stabilizer_stem(depth, slop, throw) {
19    difference(){
20      // outside shape
21      linear_extrude(height = depth) {
22        offset(r=1){
23          square(outer_cherry_stabilizer_stem(slop) - [2,2], center=true);
24        }
25      }
26  
27      inside_cherry_stabilizer_cross(slop);
28    }
29  }