chiark / gitweb /
flyscreen-handle: wip, HandleSection
[reprap-play.git] / flyscreen-handle.scad
1 // -*- C -*-
2
3 opening_height = 7.84;
4 opening_depth = 7.88;
5 openingcnr_dia = 2.75;
6 opening_topprotr = 1.54;
7
8 gap = 0.25;
9
10 bot_overlap = 5;
11 bot_w = 3;
12
13 handle_d = 2;
14 handle_w = 8;
15 handle_rh = 2;
16 handle_rcut = 3;
17
18 // calculated
19
20 ins_irad = openingcnr_dia/2 + gap;
21 ins_orad = openingcnr_dia/2 + opening_height - gap;
22 ins_th = ins_orad - ins_irad;
23
24 handle_x0 = ins_irad;
25 handle_h = bot_overlap + ins_th;
26 handle_y0 = -ins_orad-bot_overlap;
27 handle_y1 = handle_y0 + handle_h;
28
29 handle_x1 = handle_x0 + bot_w + handle_w;
30
31 module InsertSection(){
32   translate([-ins_orad, 0]) square([ins_th, opening_topprotr]);
33   translate([0, -ins_orad]) square([ins_irad+1, ins_th]);
34   intersection(){
35     translate([0.1,0.1]) mirror([1,1]) square([100,100]);
36     difference(){
37       circle(r= ins_orad);
38       circle(r= ins_irad, $fn=20);
39     }
40   }
41 }
42
43 module HandleSection(){
44   difference(){
45     hull(){
46       translate([handle_x0, handle_y0])
47         square([bot_w, handle_h]);
48       for (dy= [handle_rh/2, handle_h - handle_rh/2]) {
49         translate([handle_x1 - handle_rh/2, handle_y0 + dy])
50           circle(r= handle_rh/2, $fn=20);
51       }
52     }
53     hull(){
54       for (x= [handle_x0 + bot_w + handle_rcut/2,
55                handle_x1 - handle_rh/2 - handle_rcut/2]) {
56         translate([x, handle_y1])
57           circle(r = handle_rcut/2, $fn=20);
58       }
59     }
60   }
61 }
62
63 InsertSection();
64 HandleSection();