chiark / gitweb /
laptop-camera-tripod-bracket: wip
[reprap-play.git] / laptop-camera-tripod-bracket.scad
1 // -*- C -*-
2
3 laptop_w       = 310;
4 laptop_th_rear  = 14;
5 laptop_th_front = 11;
6 laptop_halfdepth = 125;
7 laptop_inner_x_clear = 95;
8
9 include <utils.scad>
10
11 bar_w = 20;
12 bar_th = 10;
13 flex_allow = 3;
14 claw_th = 5;
15 claw_overlap = 10;
16
17 module ClawProfile(laptop_th){
18   laptop_zmin = bar_th + flex_allow;
19   laptop_zmax = laptop_zmin + laptop_th;
20   difference(){
21     rectfromto([-claw_overlap, 0],
22                [claw_th, laptop_zmax + claw_th]);
23     rectfromto([-claw_overlap-1, laptop_zmin ],
24                [ 0, laptop_zmax ]);
25   }
26 }
27
28 module ClawBar(inner_len, laptop_th){
29   rotate([0,0,180]) linextr_y_xz(-bar_w/2, +bar_w/2) {
30     rectfromto([0,0],
31                [inner_len, bar_th]);
32     translate([inner_len, 0])
33       ClawProfile(laptop_th);
34   }
35 }
36
37 module Body(){
38   for (m=[0,1]) {
39     mirror([m,0]) {
40       ClawBar(laptop_w/2, laptop_th_rear);
41       translate([ laptop_w/2 - laptop_inner_x_clear + bar_w/2, 0])
42         rotate([0,0,-90])
43         ClawBar(laptop_halfdepth, laptop_th_front);
44     }
45   }
46 }
47
48 //ClawProfile(laptop_th_front);
49 //ClawBar(125, laptop_th_front);
50 Body();