chiark / gitweb /
pattress-boxes-3-cover: LidSide, wip
[reprap-play.git] / pattress-boxes-3-cover.scad
1 // -*- C -*-
2
3 patbox_side = 87 + 0.5;
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 // computed
23
24 lid_inner_max_h = lid_box_overlap + lid_fatbox_h + lid_fatbox_switches_h;
25 lid_inner_min_h = lid_box_overlap + lid_fatbox_switches_h;
26
27 lid_inner_kink = [thinbox_len, thinbox_len*2];
28
29 lid_rail_w = (patbox_side - lid_max_switches_w)/2 - lid_switches_y_slop;
30
31 lid_rail_h = lid_fatbox_switches_h;
32
33 echo(lid_rail_w);
34
35 module LidSideProfile(){
36   polygon([[-lid_top_wall,     lid_inner_max_h],
37            [lid_inner_kink[0], lid_inner_max_h],
38            [lid_inner_kink[1], lid_inner_min_h],
39            [total_len,         lid_inner_min_h],
40            [total_len,         -lid_front_wall],
41            [-lid_top_wall,     -lid_front_wall]]);
42 }
43
44 module LidSide(){
45   overlap = [0.1, 0.1, 0.1];
46
47   rotate([90,0,0])
48     linear_extrude(height= lid_side_wall)
49     LidSideProfile();
50
51   translate(-overlap)
52     cube(overlap + [total_len, lid_rail_w, lid_rail_h]);
53
54   translate([-0.1, -0.1, -lid_front_wall])
55     cube([total_len+0.1, patbox_side/2 + 0.2, lid_front_wall]);
56 }
57
58 LidSide();