@@ -23,7 +23,7 @@ module DebugPCB() {
2323 translate ([0 , 0 , m3_insert_hole_depth])
2424
2525 // move by the offset
26- translate ([PCB_offset .x, PCB_offset .y, 0 ])
26+ translate ([MainCase_pcb_offset .x, MainCase_pcb_offset .y, 0 ])
2727
2828 // import the file
2929 rotate ([0 , 0 , 90 ])
@@ -65,28 +65,28 @@ module GpsAntennaHousingPyramid() {
6565 cube ([100 , 100 , 100 ]);
6666
6767 hull () {
68- translate ([0 , 0 , GpsAntennaHousing_depth - 1 ])
68+ translate ([0 , 0 , MainCase_gps_antenna_housing_depth - 1 ])
6969 linear_extrude(1 )
70- polygon(roundedRectangle(GpsAntennaHousing_top_width, GpsAntennaHousing_top_height, GpsAntennaHousing_top_radius ));
70+ polygon(roundedRectangle(MainCase_gps_antenna_housing_top_width, MainCase_gps_antenna_housing_top_height, MainCase_gps_antenna_housing_top_radius ));
7171
72- translate ([0 , GpsAntennaHousing_bottom_offset , - 1 ])
72+ translate ([0 , MainCase_gps_antenna_housing_bottom_offset , - 1 ])
7373 linear_extrude(1 )
74- polygon(roundedRectangle(GpsAntennaHousing_bottom_width, GpsAntennaHousing_bottom_height, GpsAntennaHousing_bottom_radius ));
74+ polygon(roundedRectangle(MainCase_gps_antenna_housing_bottom_width, MainCase_gps_antenna_housing_bottom_height, MainCase_gps_antenna_housing_bottom_radius ));
7575 }
7676 }
7777}
7878
7979module GpsAntennaLidCutBody(tab_clearance=0) {
8080 union () {
81- translate ([- 50 , - GpsAntennaHousing_top_height /2 + GpsAntennaLid_offset, GpsAntennaHousing_depth - GpsAntennaLid_thickness ])
81+ translate ([- 50 , - MainCase_gps_antenna_housing_top_height /2 + MainCase_gps_antenna_lid_offset, MainCase_gps_antenna_housing_depth - MainCase_gps_antenna_lid_thickness ])
8282 cube ([100 , 100 , 10 ]);
8383
84- translate ([0 , - GpsAntennaHousing_top_height /2 + GpsAntennaLid_offset, GpsAntennaHousing_depth - GpsAntennaLid_thickness ])
85- linear_extrude(GpsAntennaLid_tab_height - tab_clearance)
84+ translate ([0 , - MainCase_gps_antenna_housing_top_height /2 + MainCase_gps_antenna_lid_offset, MainCase_gps_antenna_housing_depth - MainCase_gps_antenna_lid_thickness ])
85+ linear_extrude(MainCase_gps_antenna_lid_tab_height - tab_clearance)
8686 polygon(polyRound(mirrorPoints([
8787 [0 , 0 , 0 ],
88- [GpsAntennaLid_tab_width / 2 - tab_clearance, 0 , 0 ],
89- [GpsAntennaLid_tab_width / 2 - GpsAntennaLid_tab_depth - tab_clearance, - GpsAntennaLid_tab_depth + tab_clearance, 0 ],
88+ [MainCase_gps_antenna_lid_tab_width / 2 - tab_clearance, 0 , 0 ],
89+ [MainCase_gps_antenna_lid_tab_width / 2 - MainCase_gps_antenna_lid_tab_depth - tab_clearance, - MainCase_gps_antenna_lid_tab_depth + tab_clearance, 0 ],
9090 ], 180 ), fn=$ pfn));
9191 }
9292}
@@ -96,26 +96,26 @@ module GpsAntennaHousing() {
9696 GpsAntennaHousingPyramid();
9797
9898 // Hole for ceramic antenna
99- cube ([GpsAntennaHousing_hole_width, GpsAntennaHousing_hole_height , 100 ], center= true );
99+ cube ([MainCase_gps_antenna_housing_hole_width, MainCase_gps_antenna_housing_hole_height , 100 ], center= true );
100100
101101 // remove the lid
102102 GpsAntennaLidCutBody();
103103
104104 // heatset insert hole
105- translate ([0 , GpsAntennaHousing_top_height / 2 - GpsAntennaHousing_screw_offset , GpsAntennaHousing_depth - GpsAntennaLid_thickness ])
105+ translate ([0 , MainCase_gps_antenna_housing_top_height / 2 - MainCase_gps_antenna_housing_screw_offset , MainCase_gps_antenna_housing_depth - MainCase_gps_antenna_lid_thickness ])
106106 HeatsetInsertHole();
107107 }
108108}
109109
110110module GpsAntennaLid() {
111- translate ([0 , 0 , - GpsAntennaHousing_depth + GpsAntennaLid_thickness ])
111+ translate ([0 , 0 , - MainCase_gps_antenna_housing_depth + MainCase_gps_antenna_lid_thickness ])
112112 difference () {
113113 intersection () {
114114 GpsAntennaHousingPyramid();
115115 GpsAntennaLidCutBody(0.15 );
116116 }
117117
118- translate ([0 , GpsAntennaHousing_top_height / 2 - GpsAntennaHousing_screw_offset , GpsAntennaHousing_depth - GpsAntennaLid_thickness ])
118+ translate ([0 , MainCase_gps_antenna_housing_top_height / 2 - MainCase_gps_antenna_housing_screw_offset , MainCase_gps_antenna_housing_depth - MainCase_gps_antenna_lid_thickness ])
119119 cylinder (d= m3_screw_diameter_loose, h= 10 , $ fn= 32 );
120120 }
121121}
@@ -139,16 +139,16 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
139139
140140 union () {
141141 translate ([wall_thickness, wall_thickness, wall_thickness]) {
142- translate ([PCB_offset [0 ], PCB_offset [1 ], 0 ]) {
143- translate ([PCB_holes [0 ][ 0 ], PCB_holes [0 ][ 1 ] , 0 ])
144- HeatsetInsertStandoff(PCB_holes [0 ][ 0 ] + PCB_offset [0 ]);
142+ translate ([MainCase_pcb_offset [0 ], MainCase_pcb_offset [1 ], 0 ]) {
143+ translate ([MainCase_pcb_holes [0 ].x, MainCase_pcb_holes [0 ].y , 0 ])
144+ HeatsetInsertStandoff(MainCase_pcb_holes [0 ].x + MainCase_pcb_offset [0 ]);
145145
146- translate ([PCB_holes [1 ][ 0 ], PCB_holes [1 ][ 1 ] , 0 ])
146+ translate ([MainCase_pcb_holes [1 ].x, MainCase_pcb_holes [1 ].y , 0 ])
147147 HeatsetInsertStandoff();
148148
149- translate ([PCB_holes [2 ][ 0 ], PCB_holes [2 ][ 1 ] , 0 ])
149+ translate ([MainCase_pcb_holes [2 ].x, MainCase_pcb_holes [2 ].y , 0 ])
150150 rotate ([0 , 0 , 180 ])
151- HeatsetInsertStandoff(OBS_height - PCB_holes [2 ][ 0 ] - 2 * wall_thickness - PCB_offset [0 ]);
151+ HeatsetInsertStandoff(OBS_height - MainCase_pcb_holes [2 ].x - 2 * wall_thickness - MainCase_pcb_offset [0 ]);
152152 }
153153 }
154154 }
@@ -197,7 +197,7 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
197197 ], fn=$ pfn));
198198
199199 // Hole 4
200- * translate ([OBS_height- TopHole4_offset_top , OBS_width- sin (frontside_angle)* TopHole4_offset_top, 0 ])
200+ * translate ([OBS_height- MainCaseLid_hole4_offset_x , OBS_width- sin (frontside_angle)* TopHole4_offset_top, 0 ])
201201 rotate ([0 , 0 , frontside_angle]) {
202202 translate ([0 , - wall_thickness, 0 ])
203203 linear_extrude(OBS_depth)
@@ -245,13 +245,13 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
245245 translate ([0 , 78 , 0 ])
246246 cube ([OBS_height- 16 ,30 ,100 ]);
247247
248- translate ([0 , PCB_offset .y + wall_thickness- 30 , 0 ])
248+ translate ([0 , MainCase_pcb_offset .y + wall_thickness- 30 , 0 ])
249249 cube ([OBS_height- 16 ,30 ,100 ]);
250250 }
251251 }
252252
253253 // Housing for the GPS antenna
254- translate ([OBS_height, GPS_antenna_offset , OBS_depth/2 ])
254+ translate ([OBS_height, MainCase_gps_antenna_y_offset , OBS_depth/2 ])
255255 rotate ([0 , 90 , 0 ])
256256 GpsAntennaHousing();
257257
@@ -263,16 +263,16 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
263263 union () {
264264 // not shift on y by wall_thickness
265265 translate ([wall_thickness, 0 , wall_thickness])
266- linear_extrude(UsbCharger_height )
266+ linear_extrude(MainCase_usb_port_housing_height )
267267 polygon(polyRound([
268268 [0 , 0 , 0 ],
269- [UsbCharger_width , 0 , 0 ],
270- [UsbCharger_width, UsbCharger_depth + 0.92 , 3 ],
271- [0 , UsbCharger_depth + 0.92 , 0 ],
269+ [MainCase_usb_port_housing_width , 0 , 0 ],
270+ [MainCase_usb_port_housing_width, MainCase_usb_port_housing_depth + 0.92 , 3 ],
271+ [0 , MainCase_usb_port_housing_depth + 0.92 , 0 ],
272272 ], fn=$ pfn));
273273
274274 // a little standoff for the PCB
275- translate ([wall_thickness, PCB_offset .y + wall_thickness, wall_thickness])
275+ translate ([wall_thickness, MainCase_pcb_offset .y + wall_thickness, wall_thickness])
276276 linear_extrude(m3_insert_hole_depth)
277277 polygon(polyRound([
278278 [0 , 0 , 0 ],
@@ -300,13 +300,13 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
300300 // The hole for the sensor
301301 translate ([OBS_height- 16 , OBS_width- 16 - sin (frontside_angle)* 16 , 0 ]) {
302302 translate ([0 , 0 , - 2 ])
303- cylinder (r= SensorHole_diameter /2 , h= 70 + 4 );
303+ cylinder (r= MainCase_sensor_hole_diameter /2 , h= 70 + 4 );
304304
305305 // In the main case, we have to cut the clearance hole larger than
306306 // requeste, to account for the width and twice the clearance of the rim
307307 // in the lid
308308 translate ([0 , 0 , wall_thickness])
309- cylinder (r= SensorHole_diameter /2 + SensorHole_ledge + MainCaseLid_rim_width+ MainCaseLid_rim_clearance* 2 , h= 70 );
309+ cylinder (r= MainCase_sensor_hole_diameter /2 + MainCase_sensor_hole_ledge + MainCaseLid_rim_width+ MainCaseLid_rim_clearance* 2 , h= 70 );
310310 }
311311
312312 // Hole for accessing Micro-USB of the ESP32 from underneath the GPS
@@ -317,17 +317,17 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
317317
318318 // Hole for GPS antenna cable from the inside of the antenna housing to the
319319 // inside of the main case
320- translate ([OBS_height, GPS_antenna_offset , OBS_depth/2 ])
320+ translate ([OBS_height, MainCase_gps_antenna_y_offset , OBS_depth/2 ])
321321 rotate ([0 , 90 , 0 ]) {
322322 translate ([0 , - 13.5 , 0 ])
323- cylinder (d= GpsAntennaHousing_cable_hole_diameter , h= GpsAntennaHousing_cable_hole_diameter , center= true );
323+ cylinder (d= MainCase_gps_antenna_housing_cable_hole_diameter , h= MainCase_gps_antenna_housing_cable_hole_diameter , center= true );
324324
325325 * translate ([0 , - 13.5 + 4 , 0 ])
326326 cube ([4 , 8 , 4 ], center= true );
327327 }
328328
329329 // Cutouts and hole for switch
330- translate ([Switch_offset_bottom , OBS_width_small+ sin (frontside_angle)* Switch_offset_bottom , wall_thickness+ 4 ])
330+ translate ([MainCase_switch_offset_x , OBS_width_small+ sin (frontside_angle)* MainCase_switch_offset_x , wall_thickness+ 4 ])
331331 rotate ([0 , 0 , frontside_angle]) {
332332 // Square cutout on outside
333333 translate ([0 , 0 , 11 ])
@@ -350,7 +350,7 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
350350
351351
352352 // Hole for USB Cover
353- translate ([UsbPort_offset , UsbCover_depth, 0 ])
353+ translate ([MainCase_usb_port_x_offset , UsbCover_depth, 0 ])
354354 rotate ([0 , 0 , 180 ]) {
355355 UsbCoverMainBody(clearance= 0.15 );
356356
@@ -362,7 +362,7 @@ module MainCase(without_inserts=false, top_rider=MainCase_top_rider, back_rider=
362362 }
363363
364364 // Hole for USB Charger Port
365- translate ([UsbPort_offset , 0 , m3_insert_hole_depth + wall_thickness - UsbPort_vertical_offset ])
365+ translate ([MainCase_usb_port_x_offset , 0 , m3_insert_hole_depth + wall_thickness - MainCase_usb_port_vertical_offset ])
366366 hull ()for (i= [- 1 , 1 ])for (j= [- 1 , 1 ]) {
367367 translate ([i/2 * 6.5 , 0 , j/2 * 0.7 ])
368368 rotate ([- 90 , 0 , 0 ])
0 commit comments