chiark / gitweb /
poster-tube-lid: LimitForHandling: central part
[reprap-play.git] / anglepoise-neck.scad
1 // -*- C -*-
2
3 arm_depth = 25;
4 arm_innerwidth = 9.60 - 0.50;
5 arm_innerheight = 8.90 - 0.50;
6 arm_pin_depth = 18.50 + 1.0;
7 arm_pin_dia = 1.5 + 0.7;
8
9 armpart_hex_rad = 15;
10 armpart_main_thick = 8;
11
12 hingepin_dia = 3 + 1.0;
13 hingenut_width = 6 + 1.0;
14 hingenut_depth = 4;
15 hingenut_clear = 5;
16
17 headpart_main_dia = 15 + 0.3;
18 headpart_main_len = 16 + 1.1;
19 headpart_stub_protrude = 2;
20 headpart_stub_width = 11.7 - 0.6;
21
22 headpart_flatten_angle = 45;
23
24 // computed
25
26 armpart_hinge_height = arm_innerheight + hingenut_width/2 + hingenut_clear;
27 armpart_main_height = armpart_hinge_height + headpart_stub_width / 2;
28 armpart_main_width = headpart_stub_width;
29 armpart_x_unit = armpart_hex_rad * tan(30);
30 headpart_flatten_z = headpart_main_dia/2 * cos(headpart_flatten_angle);
31 headpart_stub_support_x = headpart_stub_width * cos(59) / 2;
32 headpart_stub_len = headpart_stub_protrude + headpart_main_dia/2;
33 hingenut_depth_y =
34   sqrt(headpart_main_dia*headpart_main_dia/4 - hingenut_width*hingenut_width/4)
35   - hingenut_depth;
36
37 module ArmPart(){ ////toplevel
38   difference(){
39     translate([-arm_innerwidth/2, 1, 0])
40       mirror([0,-1,0])
41       cube([arm_innerwidth, arm_depth+1, arm_innerheight]);
42     translate([0, -arm_pin_depth, -50])
43       cylinder(r=arm_pin_dia/2, h=100, $fn=20);
44   }
45   difference(){
46     translate([-armpart_main_width/2, 0, 0])
47       cube([armpart_main_width, armpart_main_thick, armpart_main_height]);
48     translate([0,50,armpart_hinge_height])
49       rotate([90,0,0])
50       cylinder(r=hingepin_dia/2, h=100, $fn=20);
51   }
52 }
53
54 module HeadPart(){ ////toplevel
55   difference(){
56     union(){
57       translate([-headpart_main_len/2, 0,0])
58         rotate([0,90,0])
59         cylinder(r=headpart_main_dia/2, h=headpart_main_len, $fn=40);
60       rotate([90,0,0])
61         cylinder(h = headpart_stub_len,
62                  r = headpart_stub_width/2,
63                  $fn = 6);
64       translate([-headpart_stub_support_x,
65                  -headpart_stub_len,
66                  -headpart_main_dia/2])
67         cube([headpart_stub_support_x*2,
68               headpart_stub_len,
69               headpart_main_dia/2]);
70     }
71     translate([-100,-100,-100])
72       cube([200,200, 100 - headpart_flatten_z]);
73     rotate([90,0,0])
74       translate([0,0, -100])
75       cylinder(r=hingepin_dia/2, h = 200, $fn=20);
76     translate([0,hingenut_depth_y,0])
77       rotate([90,0,180])
78       cylinder(r=hingenut_width/2/cos(30), h=20, $fn=6);
79   }
80 }
81
82 //ArmPart();
83 //HeadPart();