chiark / gitweb /
air-hockey-puck: wip
[reprap-play.git] / startech-dell-usb-cable-retainer.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 body_depth = 40.15 + 4;
6 body_height = 16.78 + 0.50;
7
8 back_round_depth = 2.0;
9 back_round_rad = 8.0;
10 back_above_height = 5.3;
11 back_thick = 3.0;
12
13 conn_thick = 6.42 + 2.25;
14 wire_thick = 6.00 + 0.75;
15 total_depth = 63.82 - 1.0;
16
17 body_front_overlap = 3;
18
19 prong_higher = 1.5;
20 prong_depth = 5.0;
21 prong_width = 2.0;
22
23 base_thick = 4;
24
25 $fa= 3;
26 $fs= 0.3;
27
28 // calculated
29
30 epp0 = [ 0, -body_height/2 ];
31 epp1 = [ 0, -conn_thick/2 ];
32 epp2 = epp1 + [ -body_front_overlap, 0 ];
33 epp3 = [ +body_depth -total_depth, epp2[1] ];
34 epp4 = [ epp3[0], +conn_thick/2 +prong_higher ];
35 epp4a = epp4 + prong_higher * [0,-1];
36 epp4b = epp4 + prong_higher * [1,0];
37 epp5 = epp4 + [ -prong_depth, 0 ];
38 epp6 = [ epp5[0], epp0[1] -base_thick ];
39 epp7 = [ epp2[0], epp6[1] ];
40 epp12 = [ +body_depth +back_round_rad, 0 ];
41 epp11 = [ +body_depth +back_round_depth, epp0[1] ];
42 epp10 = [ epp11[0], +back_above_height ];
43 epp9 = epp10 + [ +back_thick, 0 ];
44 epp8 = [ epp9[0], epp7[1] ];
45   
46 y1 = wire_thick/2;
47 y2 = y1 + prong_width;
48
49 module MainElevation(){
50   polygon([epp0,
51            epp1,
52            epp3,
53            epp4a,
54            epp4b,
55            epp5,
56            epp6,
57            epp8,
58            epp9,
59            epp10,
60            epp11
61            ]);
62   intersection(){
63     translate(epp12) circle(r= back_round_rad);
64     rectfromto(epp8,
65                epp10 + [-back_round_rad, 0]);
66   }
67 }
68
69 module Retainer(){
70   difference(){
71     linextr_y_xz( -y2, +y2 ) {
72       MainElevation();
73     }
74     linextr_y_xz( -y1, +y1 ) {
75       rectfromto( epp7 + [+1, -1],
76                   epp5 + [-1, +1] );
77     }
78   }
79 }
80
81 module RetainerPrint(){
82   rotate([0,0,180]) Retainer();
83 }
84
85 //MainElevation();
86
87 RetainerPrint();