chiark / gitweb /
velux-window-grip: MainLoopTest 1
[reprap-play.git] / velux-window-grip.scad
1 // -*- C -*-
2
3 include <funcs.scad>
4
5 main_thick = 3.3;
6 main_in_dia = 28.9 + 0.5;
7
8 horn_ext_dia = 20 - 0.5; //?
9
10 horn_c_x = -6; //?
11 horn_c_dy= -4; //?
12
13 blhook_start_ang = 40; //?
14
15 blhook_str_len = 5.4;
16 blhook_mid_rad = 3.5; //?
17
18 width = 20;
19
20 mc_mid_rad = main_in_dia/2 + main_thick/2;
21
22 mc_bl = circle_point([0,0], mc_mid_rad, 270-blhook_start_ang);
23
24 $fs=0.05;
25
26 horn_thick = main_thick;
27
28 module MainLoop(){
29   intersection(){
30     difference(){
31       circle(r= main_in_dia/2 + main_thick, $fn=50);
32       circle(r= main_in_dia/2, $fn=50);
33     }
34     polygon([[0,0],
35              3*mc_bl,
36              [0, -100],
37              [100,-100],
38              [100,100],
39              [0,100]]);
40   }
41   translate(mc_bl)
42     circle(main_thick/2);
43   translate([horn_c_x, mc_mid_rad + horn_c_dy])
44     intersection(){
45     difference(){
46       circle(horn_ext_dia/2);
47       intersection(){
48         circle(horn_ext_dia/2 - horn_thick);
49         polygon([[-50,-50],
50                  [-50,-horn_c_dy],
51                  [50,-horn_c_dy],
52                  [50,-50]]);
53       }
54     }
55     polygon([[0,0],
56               [-50,0],
57               [0,50]]);
58   }
59   translate([0,main_in_dia/2]) mirror([1,0])
60     square([-horn_c_x + horn_ext_dia/2 * 0.75, main_thick]);
61   translate(mc_bl){
62     translate([-blhook_str_len/2, 0])
63       square(center=true, [blhook_str_len, main_thick]);
64     translate([-blhook_str_len, blhook_mid_rad]){
65       intersection(){
66         difference(){
67           circle(r=blhook_mid_rad + main_thick/2);
68           circle(r=blhook_mid_rad - main_thick/2);
69         }
70         mirror([1,1]) square(50);
71       }
72     }
73   }
74 }
75
76 module MainLoopTest(){
77   linear_extrude(height=1.6)
78     MainLoop();
79 }
80
81 MainLoopTest();
82