chiark / gitweb /
tablet-stand: wip
[reprap-play.git] / tablet-stand.scad
1 // -*- C -*-
2
3 whole_depth = 90;
4 whole_width = 120;
5
6 antifoot_width = 15;
7 antifoot_height = 15;
8 antifoot_slope = 1.0;
9 antifoot_depth = 10;
10 antifoot_base = 12;
11 antifoot_front = 5;
12
13 leg_width = 8;
14 leg_thick = 8;
15
16 post_height = 50;
17 orifice_dia = 22.1 + 0.3;
18 post_thick = 8;
19
20 stretcher_thick = 5;
21 stretcher_width = 8;
22
23 antifoot_back = antifoot_depth + antifoot_height/antifoot_slope;
24 post_rad = orifice_dia/2 + post_thick;
25
26 module AntiFoot(){
27   translate([-antifoot_front-antifoot_back, antifoot_width/2, 0])
28     rotate([90,0,0])
29     translate([antifoot_front, antifoot_base, 0])
30     linear_extrude(height=antifoot_width)
31     polygon([[-antifoot_front, -antifoot_base],
32            [-antifoot_front,  antifoot_height],
33            [0,               antifoot_height],
34            [0,               0],
35            [antifoot_depth,  0],
36            [antifoot_back, antifoot_height],
37            [antifoot_back, -antifoot_base]]);
38   translate([-antifoot_back, 0, 0])
39     cube([stretcher_width, whole_width*0.55, stretcher_width]);
40 }
41
42 module LeftLeg(){
43   effective_depth = whole_depth - antifoot_back;
44   translate([-effective_depth, -whole_width/2, 0])
45     AntiFoot();
46   multmatrix([[1,0,0,0],
47               [-((whole_width - leg_width)/2 / effective_depth), 1,0,0],
48               [0,0,1,0],
49               [0,0,0,1]])
50     mirror([1,0,0])
51     cube([effective_depth, leg_width, leg_thick]);
52 }
53
54 module RightLeg(){
55   mirror([0,1,0]) LeftLeg();
56 }
57
58 module Post(){
59   cylinder(h=post_height, r=post_rad, $fn=70);
60 }
61
62 module Stand(){
63   difference(){
64     union(){
65       LeftLeg();
66       RightLeg();
67       Post();
68     }
69     translate([0,0,-1]) cylinder(h=post_height+2, r=orifice_dia/2);
70   }
71 }
72
73 Stand();