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 stretcher_thick = 5;
17 stretcher_width = 8;
18
19 antifoot_back = antifoot_depth + antifoot_height/antifoot_slope;
20
21 module AntiFoot(){
22   translate([-antifoot_front-antifoot_back, antifoot_width/2, 0])
23     rotate([90,0,0])
24     translate([antifoot_front, antifoot_base, 0])
25     linear_extrude(height=antifoot_width)
26     polygon([[-antifoot_front, -antifoot_base],
27            [-antifoot_front,  antifoot_height],
28            [0,               antifoot_height],
29            [0,               0],
30            [antifoot_depth,  0],
31            [antifoot_back, antifoot_height],
32            [antifoot_back, -antifoot_base]]);
33   translate([-antifoot_back, 0, 0])
34     cube([stretcher_width, whole_width*0.55, stretcher_width]);
35 }
36
37 module LeftLeg(){
38   effective_depth = whole_depth - antifoot_back;
39   translate([-effective_depth, -whole_width/2, 0])
40     AntiFoot();
41   multmatrix([[1,0,0,0],
42               [-((whole_width - leg_width)/2 / effective_depth), 1,0,0],
43               [0,0,1,0],
44               [0,0,0,1]])
45     mirror([1,0,0])
46     cube([effective_depth, leg_width, leg_thick]);
47 }
48
49 module RightLeg(){
50   mirror([0,1,0]) LeftLeg();
51 }
52
53 module Stand(){
54   LeftLeg();
55   RightLeg();
56 }
57
58 Stand();