chiark / gitweb /
pattress-boxes-3-cover: LidSide, introduce lid_inner_w (nfc)
[reprap-play.git] / pattress-boxes-3-cover.scad
1 // -*- C -*-
2
3 patbox_side = 87;
4 patbox_centres = 60.3;
5
6 lid_box_overlap = 5;
7
8 lid_thinbox_h = 9;
9 lid_fatbox_h = 24;
10 lid_fatbox_switches_h = 6+2;
11
12 lid_max_switches_w = 70;
13 lid_switches_y_slop = 3;
14
15 total_len = 260;
16 thinbox_len = 87;
17
18 lid_top_wall = 1.5;
19 lid_front_wall = 1.5;
20 lid_side_wall = 1.5;
21
22 lid_side_slop = 0.5;
23
24 // computed
25
26 lid_inner_max_h = lid_box_overlap + lid_fatbox_h + lid_fatbox_switches_h;
27 lid_inner_min_h = lid_box_overlap + lid_fatbox_switches_h;
28
29 lid_inner_kink = [thinbox_len, thinbox_len*2];
30
31 lid_inner_w = patbox_side + lid_side_slop;
32
33 lid_rail_w = (lid_inner_w - lid_max_switches_w)/2 - lid_switches_y_slop;
34
35 lid_rail_h = lid_fatbox_switches_h;
36
37 echo(lid_rail_w);
38
39 module LidSideProfile(){
40   polygon([[-lid_top_wall,     lid_inner_max_h],
41            [lid_inner_kink[0], lid_inner_max_h],
42            [lid_inner_kink[1], lid_inner_min_h],
43            [total_len,         lid_inner_min_h],
44            [total_len,         -lid_front_wall],
45            [-lid_top_wall,     -lid_front_wall]]);
46 }
47
48 module LidSide(){
49   overlap = [0.1, 0.1, 0.1];
50
51   rotate([90,0,0])
52     linear_extrude(height= lid_side_wall)
53     LidSideProfile();
54
55   translate(-overlap)
56     cube(overlap + [total_len, lid_rail_w, lid_rail_h]);
57
58   translate([-0.1, -0.1, -lid_front_wall])
59     cube([total_len+0.1, lid_inner_w/2 + 0.2, lid_front_wall]);
60 }
61
62 LidSide();