chiark / gitweb /
tablet-case-corner-mount: plans
[reprap-play.git] / tablet-case-corner-mount.scad
1 // -*- C -*-
2
3 main_sz = 20;
4
5 wall_th = 3;
6
7 front_fullsz = 10;
8
9 back_tot_l = 30;
10 back_cut_l = 4;
11 back_cut_w = 10;
12 back_prong_w = 3;
13
14 module MidPlan(){
15   polygon([[0,            0],
16            [0,            main_sz],
17            [wall_th,      main_sz],
18            [wall_th,      wall_th],
19            [main_sz,      wall_th],
20            [main_sz,      0]]);
21 }
22
23 module FrontPlan(){
24   halfway = (front_fullsz + main_sz)/2;
25   polygon([[0,            0],
26            [0,            main_sz],
27            [front_fullsz, main_sz],
28            [main_sz,      front_fullsz],
29            [main_sz,      0]]);
30 }
31
32 module BackPlan(){
33   sqmid = main_sz * sqrt(0.5);
34   prlen = back_tot_l - sqmid;
35   prx = 0.5*back_cut_w + back_prong_w;
36   difference(){
37     union(){
38       square(main_sz);
39       rotate(-45) translate([-prx, sqmid])
40         square([prx*2,prlen]);
41     }
42     rotate(-45) translate([-back_cut_w/2, back_tot_l-back_cut_l])
43       square([back_cut_w, back_cut_l+1]);
44   }
45 }
46
47 //MidPlan();
48 //FrontPlan();
49 BackPlan();