14 attach_hole_dia = 4 + 0.5;
28 leftend_dz = comp_zsz * 0.6;
37 cover_lcircle_r = cover_ysz / (1 + 1/sqrt(2));
39 base_len = cover_len - cover_lcircle_r;
41 attach_end_r = attach_w/2;
44 attach_inrad + tube_dia + attach_hole_dist + attach_hole_dia/2
45 - attach_end_r + attach_hole_dist;
47 attach_down = tube_dia/2 + attach_dz;
49 attach_xmax = attach_cx +
50 cos(attach_ang) * attach_straight_len + attach_end_r;
52 module RearSideTemplate(){
55 [-base_len,-cover_ysz],
57 translate([-base_len, -cover_ysz + cover_lcircle_r])
58 circle(r=cover_lcircle_r);
61 module AttachTemplate(){
67 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
68 polygon([[-attach_cx, attach_w/2],
70 [attach_straight_len, -attach_w/2],
71 [attach_straight_len, attach_w/2]]);
72 translate([attach_straight_len, 0])
73 circle(r=attach_end_r);
78 module AttachElevation(anddown){
80 translate([-cover_len - 0.5, leftend_dz - leftend_zsz/2])
81 square([1, leftend_zsz]);
82 translate([-comp_dx - comp_xsz/2, -0.1])
83 square([comp_xsz, comp_zsz + min_thick]);
84 translate([attach_xmax, 0])
85 square([1, rightend_thick + bolthead_space]);
88 translate([-comp_dx, -attach_down-5])
89 square([comp_dx + attach_xmax+2, attach_down+6]);
92 module AttachElevationSelector(anddown) {
93 translate([0,100,0]) rotate([90,0,0]) linear_extrude(height=200)
94 AttachElevation(anddown);
97 module BodyPositive(){
99 linear_extrude(height=60) RearSideTemplate();
100 AttachElevationSelector(false);
103 translate([0,0,-attach_down]) linear_extrude(height=100) AttachTemplate();
104 AttachElevationSelector(true);
118 translate([-100,-200,-100]) cube([200,200,200]);
125 multmatrix([[1,0,0,0],
126 [0,1, tan(90-comp_slope), 0],
129 translate([-comp_dx - comp_xsz/2, -cover_ysz + comp_dy, -50])
130 cube([comp_xsz, 100, comp_zsz + 50]);
134 translate([attach_cx, -attach_cdy, -tube_dia/2 - 0.1 - attach_dz]) {
135 rotate_extrude(convexity=10) {
136 translate([attach_inrad + tube_dia/2, 0])
137 circle(r=tube_dia/2);
143 translate([0,0,-50]) linear_extrude(height=80) {
144 circle(r=attach_hole_dia/2, $fn=20);
146 translate([0,0,rightend_thick]) linear_extrude(height=80) {
147 circle(r=attach_hole_dia/2 * 2, $fn=20);
152 translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
153 translate([attach_inrad - attach_hole_dist - attach_hole_dia/2, 0])
155 translate([attach_inrad + tube_dia
156 +attach_hole_dist + attach_hole_dia/2, 0])