chiark / gitweb /
mic-table-clamp: Adjustments from blank, binary chop
[reprap-play.git] / laptop-camera-tripod-bracket.scad
1 // -*- C -*-
2
3 // High Detail
4 // support enabled
5 //   distance x/y 2.5mm
6 // fill density 30%
7
8 laptop_w       = 310;
9 laptop_th_rear  = 14;
10 laptop_th_front = 11;
11 laptop_halfdepth_real = 125;
12 laptop_halfdepth = 115; //125;
13 laptop_inner_x_clear = 95;
14
15 include <utils.scad>
16 include <camera-mount.scad>
17
18 bar_w = 15;
19 bar_th = 12;
20 flex_allow = 3;
21 claw_th = 6;
22 claw_overlap = 15;
23 mount_dia = 50;
24
25 min_ceil = 1;
26
27 //$test=true;
28 $test=false;
29
30 module ClawProfile(laptop_th){
31   laptop_zmin = bar_th + flex_allow;
32   laptop_zmax = laptop_zmin + laptop_th;
33   difference(){
34     rectfromto([-claw_overlap, 0],
35                [claw_th, laptop_zmax + claw_th]);
36     rectfromto([-claw_overlap-1, laptop_zmin ],
37                [ 0, laptop_zmax ]);
38   }
39 }
40
41 module ClawBar(inner_len, laptop_th){
42   rotate([0,0,180]) linextr_y_xz(-bar_w/2, +bar_w/2) {
43     rectfromto([0,0],
44                [inner_len, bar_th]);
45     translate([inner_len, 0])
46       ClawProfile(laptop_th);
47   }
48 }
49
50 module Body(){
51   translate([0, laptop_halfdepth - laptop_halfdepth_real, 0])
52     for (m=[0,1]) {
53       mirror([m,0]) {
54         ClawBar(laptop_w/2, laptop_th_rear);
55         translate([ laptop_w/2 - laptop_inner_x_clear + bar_w/2, 0])
56           rotate([0,0,-90])
57           ClawBar(laptop_halfdepth, laptop_th_front);
58       }
59     }
60   cylinder(r = mount_dia/2, h= bar_th);
61 }
62
63 module Bracket(){
64   difference(){
65     Body();
66     rotate([0,180,0])
67       CameraMountThread( bar_th + 2 );
68   }
69   translate([0,0, bar_th-min_ceil])
70     cylinder(r= mount_dia/2-1, h=min_ceil);
71 }
72
73 //ClawProfile(laptop_th_front);
74 //ClawBar(125, laptop_th_front);
75 //Body();
76 Bracket();