1.1 --- a/cartridge.scad Thu Aug 13 19:04:50 2015 +0200
1.2 +++ b/cartridge.scad Thu Aug 13 19:24:39 2015 +0200
1.3 @@ -1,5 +1,5 @@
1.4 /*
1.5 -Copyright (C) 2014 Paul Boddie
1.6 +Copyright (C) 2014, 2015 Paul Boddie
1.7
1.8 This program is free software; you can redistribute it and/or modify it under
1.9 the terms of the GNU General Public License as published by the Free Software
1.10 @@ -45,6 +45,7 @@
1.11
1.12 BACK = 1; BACK_SURFACE = 1;
1.13 FRONT = 1; FRONT_SURFACE = 1;
1.14 + TOP_SURFACE = 1;
1.15
1.16 /* For printing: APART = 1; PCB = 0; */
1.17
1.18 @@ -430,6 +431,11 @@
1.19
1.20 wide_pcb_lug_hole_radius = 4.0;
1.21
1.22 + /* An example feature for use with PCB testing. */
1.23 +
1.24 + feature_width = 15.0; feature_depth = 7.0; feature_height = 40.0;
1.25 + feature_height_offset = 10.0;
1.26 +
1.27 /* Repeated constructs. */
1.28
1.29 module pcb_support(xdir, bump_height, bump_offset) {
1.30 @@ -598,9 +604,10 @@
1.31
1.32 /* Top surface for the front piece. */
1.33
1.34 - cube_at(payload_width, front_depth, top,
1.35 - 0, -1, 1,
1.36 - payload_centre, 0, int_payload_upper_extent);
1.37 + if (TOP_SURFACE)
1.38 + cube_at(payload_width, front_depth, top,
1.39 + 0, -1, 1,
1.40 + payload_centre, 0, int_payload_upper_extent);
1.41 }
1.42
1.43 difference() {
1.44 @@ -835,9 +842,10 @@
1.45
1.46 /* Top of back piece. */
1.47
1.48 - cube_at(payload_width, back_depth, top,
1.49 - 0, 1, 1,
1.50 - payload_centre, 0, int_payload_upper_extent);
1.51 + if (TOP_SURFACE)
1.52 + cube_at(payload_width, back_depth, top,
1.53 + 0, 1, 1,
1.54 + payload_centre, 0, int_payload_upper_extent);
1.55
1.56 /*
1.57 The extension of the back to connect with the front. Here, the inside
1.58 @@ -1172,6 +1180,12 @@
1.59 edge_connector_height,
1.60 0, -1, -1,
1.61 0, edge_connector_cutout_back_depth, 0);
1.62 +
1.63 + /* Feature. */
1.64 +
1.65 + cube_at(feature_width, feature_depth, feature_height,
1.66 + 0, 1, 1,
1.67 + 0, edge_connector_cutout_back_depth, feature_height_offset);
1.68 }
1.69
1.70 /* Holes for mounting. */
1.71 @@ -1239,6 +1253,12 @@
1.72 edge_connector_height,
1.73 0, -1, -1,
1.74 0, edge_connector_cutout_back_depth, 0);
1.75 +
1.76 + /* Feature. */
1.77 +
1.78 + cube_at(feature_width, feature_depth, feature_height,
1.79 + 0, 1, 1,
1.80 + 0, edge_connector_cutout_back_depth, feature_height_offset);
1.81 }
1.82
1.83 /* Holes for lugs. */