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