chiark / gitweb /
f79894328dda898ab55ac62808e530379660047f
[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 = 3.0;
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 - 2.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 epp5 = epp4 + [ -prong_depth, 0 ];
36 epp6 = [ epp5[0], epp0[1] -base_thick ];
37 epp7 = [ epp2[0], epp6[1] ];
38 epp12 = [ +body_depth +back_round_rad, 0 ];
39 epp11 = [ +body_depth +back_round_depth, epp0[1] ];
40 epp10 = [ epp11[0], +back_above_height ];
41 epp9 = epp10 + [ +back_thick, 0 ];
42 epp8 = [ epp9[0], epp7[1] ];
43   
44 y1 = wire_thick/2;
45 y2 = y1 + prong_width;
46
47 module MainElevation(){
48   polygon([epp0,
49            epp1,
50            epp3,
51            epp4,
52            epp5,
53            epp6,
54            epp8,
55            epp9,
56            epp10,
57            epp11
58            ]);
59   intersection(){
60     translate(epp12) circle(r= back_round_rad);
61     rectfromto(epp8,
62                epp10 + [-back_round_rad, 0]);
63   }
64 }
65
66 module Retainer(){
67   difference(){
68     linextr_y_xz( -y2, +y2 ) {
69       MainElevation();
70     }
71     linextr_y_xz( -y1, +y1 ) {
72       rectfromto( epp7 + [+1, -1],
73                   epp5 + [-1, +1] );
74     }
75   }
76 }
77
78 //MainElevation();
79
80 Retainer();