1+ curfn = 90 ;
2+
3+ top_buckle_r = 3.85 * 0.5 ;
4+ top_buckle_space = 3 ;
5+
6+ top_radius = top_buckle_space + top_buckle_r;
7+ echo (top_radius);
8+ snap_width = 30 ; // actual is 30
9+
10+
11+ top_to_bottom = 18 ;
12+ bottom_height = 2 ;
13+ bottom_depth = 8.5 ;
14+ inner_depth = 4 ;
15+
16+
17+
18+ module bin_snap() {
19+ union () {
20+ difference () {
21+ cylinder (r = top_radius, h = snap_width, $ fn = curfn, center = true );
22+ translate ([- 1 , 0 , 0 ])
23+ cylinder (r = top_buckle_r, h = snap_width + 2 , $ fn = curfn, center = true );
24+ translate ([0 , - 5 , 0 ])
25+ cube ([top_radius * 3 , 10 , snap_width * 2 ], center = true );
26+ }
27+ translate ([- 1 * top_buckle_r+ top_buckle_space*- 0.5 - 0.5 , inner_depth / - 2 + 0.1 , 0 ])
28+ cube ([top_radius - top_buckle_r- 1 , inner_depth, snap_width], center = true );
29+ // echo(top_radius*0.5+0.5);
30+ translate ([top_buckle_r+ top_buckle_space* 0.5 - 0.5 , top_to_bottom / - 2 + 0.1 , 0 ])
31+ cube ([top_radius - top_buckle_r+ 1 , top_to_bottom, snap_width], center = true );
32+
33+
34+ translate ([- 1 ,top_to_bottom*- 1 + 0.1 ,0 ])
35+ cube ([top_radius* 2 + 2 , bottom_height, snap_width], center = true );
36+ }
37+ }
38+
39+ max_width = 175 ;
40+ max_depth = 185 ;
41+ max_height = 76 ;
42+ wall_thickness = 4 ;
43+ floor_thickness = 2 ;
44+
45+
46+ module housing_bottom() {
47+
48+ difference () {
49+ cube ([max_width, max_depth, max_height], center = true );
50+ translate ([0 , 0 , floor_thickness])
51+ cube ([max_width - wall_thickness, max_depth - wall_thickness, max_height], center = true );
52+ }
53+ }
54+
55+ module power_jack() {
56+ power_jack_height = 27.1 ;
57+ power_jack_width = 47.04 ;
58+ power_jack_hole_offset = 6 ;
59+ power_jack_hole_d = 4.5 ;
60+ cube ([power_jack_width, 30 , power_jack_height], center = true );
61+ translate ([0 , 0 , (power_jack_height / 2 ) + power_jack_hole_offset])
62+ rotate ([0 , 90 , 90 ])
63+ cylinder (d = power_jack_hole_d, h = 30 , center = true , $ fn = 90 );
64+ translate ([0 , 0 , (power_jack_height / - 2 ) - power_jack_hole_offset])
65+ rotate ([0 , 90 , 90 ])
66+ cylinder (d = power_jack_hole_d, h = 30 , center = true , $ fn = 90 );
67+ }
68+ module dial_circuit() {
69+ hole_diameter = 3.7 ;
70+ x_diff = 41.53 ;
71+ y_diff = 46.43 ;
72+
73+ dial_depth = 17 ;
74+ dial_diameter = 24 ;
75+ screw_height = 20 ;
76+ translate ([(x_diff + hole_diameter) / 2 , (y_diff + hole_diameter) / - 2 , 0 ])
77+ cylinder (d = hole_diameter, h = screw_height, center = true , $ fn = 90 );
78+ translate ([(x_diff + hole_diameter) / 2 , (y_diff + hole_diameter) / 2 , 0 ])
79+ cylinder (d = hole_diameter, h = screw_height, center = true , $ fn = 90 );
80+ translate ([(x_diff + hole_diameter) / - 2 , (y_diff + hole_diameter) / - 2 , 0 ])
81+ cylinder (d = hole_diameter, h = screw_height, center = true , $ fn = 90 );
82+ translate ([(x_diff + hole_diameter) / - 2 , (y_diff + hole_diameter) / 2 , 0 ])
83+ cylinder (d = hole_diameter, h = screw_height, center = true , $ fn = 90 );
84+ translate ([37 , 0 , 14 ])
85+ rotate ([0 , 90 , 0 ])
86+ cylinder (d = dial_diameter, h = dial_depth, center = true );
87+
88+ }
89+ module powersupply() {
90+ cube ([98 , 155 , 38 ], center = true );
91+
92+ }
93+
94+ difference () {
95+ housing_bottom();
96+ translate ([- 50 ,- 80 ,0 ])
97+ power_jack();
98+
99+ translate ([- 50 ,10 ,- 30 ])
100+ rotate ([0 ,0 ,180 ])
101+ dial_circuit();
102+ translate ([35 ,10 ,- 5 ])
103+ powersupply();
104+ }
105+
106+
107+ module callipercase() {
108+ tgtwidth = 245 ;
109+ tgtdepth = 85 ;
110+
111+ }
112+ // callipercase();
113+
114+ module handle() {
115+ hollow_d = 8 ;
116+ tube_d = 12 ;
117+ tgtheight = 130 ;
118+ difference () {
119+ cylinder (d = tube_d, h = tgtheight, center = true , $ fn = 90 );
120+ cylinder (d = hollow_d, h = tgtheight + 2 , center = true , $ fn = 90 );
121+ }
122+ }
123+ // bin_snap();
124+
125+ module glass_holder() {
126+ outward = 55 ;
127+ total_height = 200 ;
128+ magnet_plate_width = 40 ;
129+ union () {
130+ translate ([0 ,0 ,total_height/2 - 5 ])
131+ cube ([5 ,6 ,total_height],center= true );
132+ // magnet
133+ translate ([0 ,magnet_plate_width/2 ,total_height/2 ])
134+ cube ([5 ,magnet_plate_width,50 ],center= true );
135+ for ( idx = [0 : 3 ] ){
136+ translate ([outward/2 + 0.1 ,0 ,idx* 60 ])
137+ cube ([55 ,6 ,10 ],center= true );
138+ translate ([outward- 2 ,0 ,6 + (idx* 60 )])
139+ cube ([4 ,6 ,8 ],center= true );
140+ translate ([12 ,0 ,10 + (idx* 60 )])
141+ cube ([4 ,6 ,30 ],center= true );
142+ }
143+ }
144+ }
145+
146+ // glass_holder();
147+ module strap() {
148+ strap_r = 3 ;
149+ strap_gap = 10 ;
150+ strap_edge = 3 ;
151+ strap_width = 21 ;
152+ difference () {
153+ union () {
154+ translate ([strap_width/2 + strap_edge,0 ,0 ])
155+ cube ([strap_edge,strap_gap* 2 + strap_r* 2 ,strap_r* 2 ],center= true );
156+ translate ([- 1 * (strap_width/2 + strap_edge),0 ,0 ])
157+ cube ([strap_edge,strap_gap* 2 + strap_r* 2 ,strap_r* 2 ],center= true );
158+ translate ([0 ,strap_gap,0 ])
159+ rotate ([0 ,90 ,0 ])
160+ cylinder (center= true ,r= strap_r,h= strap_width+ strap_edge* 2 ,$ fn= 90 );
161+ rotate ([0 ,90 ,0 ])
162+ cylinder (center= true ,r= strap_r,h= strap_width+ strap_edge* 2 ,$ fn= 90 );
163+ translate ([0 ,- 1 * strap_gap,0 ])
164+ rotate ([0 ,90 ,0 ])
165+ cylinder (center= true ,r= strap_r,h= strap_width+ strap_edge* 2 ,$ fn= 90 );
166+ }
167+ translate ([0 ,0 ,strap_r*- 1 ])
168+ cube ([50 ,50 ,strap_r* 2 ],center= true );
169+ }
170+ }
171+
172+ // strap();
0 commit comments