chiark / gitweb /
laptop-sound-cable-hooks: wip
[reprap-play.git] / laptop-sound-cable-hooks.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 wall_th = 2;
6
7 plug_l_d = [[ 27.78,
8               10.62 + 0.50 ],
9             [ 40.88,
10               8.56 + 0.50 ],
11             ];
12
13 plug_stem = [ 2.72 + 0.50,
14               5.20 + 0.50 ];
15
16 module PlugMainPlan() {
17   for (l_d = plug_l_d) {
18     l = l_d[0];
19     d = l_d[1];
20     rectfromto([ -l, -d/2 ],
21                [  0, +d/2 ]);
22   }
23 }
24
25 module PlugHolderPlan() {
26   intersection(){
27     hull()
28       offset(r= wall_th)
29       PlugMainPlan();
30
31     rectfromto([-100,-100], [-0.1,+100]);
32   }
33 }
34
35 module DemoPlan() {
36   translate([0,0,-5]) color("grey") PlugHolderPlan();
37   PlugMainPlan();
38 }
39
40 module RotateIntersect(n=6){
41   intersection_for (r = [0:n-1]) {
42     rotate([r/n * 360,0,0])
43       linextr(-100,100) children(0);
44   }
45 }
46
47 module PlugHolder(){
48   difference(){
49     RotateIntersect(8)
50       PlugHolderPlan();
51
52     RotateIntersect(6)
53       PlugMainPlan();
54   }
55 }
56
57 //DemoPlan();
58 PlugHolder();