12 attach_inrad = 25; ///
13 attach_hole_dist = 5; ///
14 attach_hole_dia = 4 + 0.5; ///
24 leftend_dz = comp_zsz * 0.6;
33 cover_lcircle_r = cover_ysz / (1 + 1/sqrt(2));
35 base_len = cover_len - cover_lcircle_r;
37 attach_end_r = attach_w/2;
40 attach_inrad + tube_dia + attach_hole_dist + attach_hole_dia/2
41 - attach_end_r + attach_hole_dist;
43 attach_down = tube_dia/2 + attach_dz;
45 attach_xmax = attach_cx +
46 cos(attach_ang) * attach_straight_len + attach_end_r;
48 module RearSideTemplate(){
51 [-base_len,-cover_ysz],
53 translate([-base_len, -cover_ysz + cover_lcircle_r])
54 circle(r=cover_lcircle_r);
57 module AttachTemplate(){
63 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
64 polygon([[-attach_cx, attach_w/2],
66 [attach_straight_len, -attach_w/2],
67 [attach_straight_len, attach_w/2]]);
68 translate([attach_straight_len, 0])
69 circle(r=attach_end_r);
74 module AttachElevation(anddown){
76 translate([-cover_len - 0.5, leftend_dz - leftend_zsz/2])
77 square([1, leftend_zsz]);
78 translate([-comp_dx - comp_xsz/2, -0.1])
79 square([comp_xsz, comp_zsz + min_thick]);
80 translate([attach_xmax, 0])
81 square([1, rightend_thick + bolthead_space]);
84 translate([-comp_dx, -attach_down-5])
85 square([comp_dx + attach_xmax+2, attach_down+6]);
88 module AttachElevationSelector(anddown) {
89 translate([0,100,0]) rotate([90,0,0]) linear_extrude(height=200)
90 AttachElevation(anddown);
93 module BodyPositive(){
95 linear_extrude(height=60) RearSideTemplate();
96 AttachElevationSelector(false);
99 translate([0,0,-attach_down]) linear_extrude(height=100) AttachTemplate();
100 AttachElevationSelector(true);
113 translate([-100,-200,-100]) cube([200,200,200]);
120 translate([attach_cx, -attach_cdy, -tube_dia/2 - 0.1 - attach_dz]) {
121 rotate_extrude(convexity=10) {
122 translate([attach_inrad + tube_dia/2, 0])
123 circle(r=tube_dia/2);
129 translate([0,0,-50]) linear_extrude(height=80) {
130 circle(r=attach_hole_dia/2, $fn=20);
132 translate([0,0,rightend_thick]) linear_extrude(height=80) {
133 circle(r=attach_hole_dia/2 * 2, $fn=20);
138 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
139 translate([attach_inrad - attach_hole_dist - attach_hole_dia/2, 0])
141 translate([attach_inrad + tube_dia
142 +attach_hole_dist + attach_hole_dia/2, 0])