12 attach_inrad = 25; ///
13 attach_hole_dist = 5; ///
14 attach_hole_dia = 4 + 0.5; ///
26 leftend_dz = comp_zsz * 0.6;
35 cover_lcircle_r = cover_ysz / (1 + 1/sqrt(2));
37 base_len = cover_len - cover_lcircle_r;
39 attach_end_r = attach_w/2;
42 attach_inrad + tube_dia + attach_hole_dist + attach_hole_dia/2
43 - attach_end_r + attach_hole_dist;
45 attach_down = tube_dia/2 + attach_dz;
47 attach_xmax = attach_cx +
48 cos(attach_ang) * attach_straight_len + attach_end_r;
50 module RearSideTemplate(){
53 [-base_len,-cover_ysz],
55 translate([-base_len, -cover_ysz + cover_lcircle_r])
56 circle(r=cover_lcircle_r);
59 module AttachTemplate(){
65 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
66 polygon([[-attach_cx, attach_w/2],
68 [attach_straight_len, -attach_w/2],
69 [attach_straight_len, attach_w/2]]);
70 translate([attach_straight_len, 0])
71 circle(r=attach_end_r);
76 module AttachElevation(anddown){
78 translate([-cover_len - 0.5, leftend_dz - leftend_zsz/2])
79 square([1, leftend_zsz]);
80 translate([-comp_dx - comp_xsz/2, -0.1])
81 square([comp_xsz, comp_zsz + min_thick]);
82 translate([attach_xmax, 0])
83 square([1, rightend_thick + bolthead_space]);
86 translate([-comp_dx, -attach_down-5])
87 square([comp_dx + attach_xmax+2, attach_down+6]);
90 module AttachElevationSelector(anddown) {
91 translate([0,100,0]) rotate([90,0,0]) linear_extrude(height=200)
92 AttachElevation(anddown);
95 module BodyPositive(){
97 linear_extrude(height=60) RearSideTemplate();
98 AttachElevationSelector(false);
101 translate([0,0,-attach_down]) linear_extrude(height=100) AttachTemplate();
102 AttachElevationSelector(true);
116 translate([-100,-200,-100]) cube([200,200,200]);
123 translate([-comp_dx - comp_xsz/2, -cover_ysz + comp_dy, -50])
124 cube([comp_xsz, 100, comp_zsz + 50]);
128 translate([attach_cx, -attach_cdy, -tube_dia/2 - 0.1 - attach_dz]) {
129 rotate_extrude(convexity=10) {
130 translate([attach_inrad + tube_dia/2, 0])
131 circle(r=tube_dia/2);
137 translate([0,0,-50]) linear_extrude(height=80) {
138 circle(r=attach_hole_dia/2, $fn=20);
140 translate([0,0,rightend_thick]) linear_extrude(height=80) {
141 circle(r=attach_hole_dia/2 * 2, $fn=20);
146 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
147 translate([attach_inrad - attach_hole_dist - attach_hole_dia/2, 0])
149 translate([attach_inrad + tube_dia
150 +attach_hole_dist + attach_hole_dia/2, 0])