Blog: Heat-set threaded insert tooling box lid: box-cover.scad

File box-cover.scad, 1.2 KB (added by retracile, 7 months ago)

box-cover.scad

Line 
1/* The box the tips came in was 3D printed on an FDM printer.
2 */
3
4// All units are in inches.
5
6fitting_gap = 0.01;
7
8box_size = [
9    1.400,
10    1.750,
11    0.315,
12];
13box_wall_thickness = 0.060;
14
15lid_wall_thickness = box_wall_thickness;
16cavity_size = [
17    box_size.x + 2*fitting_gap,
18    box_size.y + 2*fitting_gap,
19    box_size.z,
20];
21
22overall_size = [
23    cavity_size.x + 2*lid_wall_thickness,
24    cavity_size.y + 2*lid_wall_thickness,
25    cavity_size.z + lid_wall_thickness,
26];
27
28finger_grip_dia = .75;
29cut_margin = 0.0001;
30
31module lid() {
32    difference() {
33        cube(overall_size);
34        translate([lid_wall_thickness, lid_wall_thickness, -cut_margin]) {
35            cube([cavity_size.x,
36                cavity_size.y,
37                cavity_size.z+cut_margin]);
38        }
39
40        // Cut out places to grab the bottom of the box
41        translate([overall_size.x/2, -cut_margin, cavity_size.z-finger_grip_dia/2]) {
42            rotate([-90, 0, 0]) {
43                cylinder(d=finger_grip_dia, h=overall_size.y+2*cut_margin, $fn=64);
44            }
45        }
46    }
47}
48
49// Position the part on its back for printing purposes
50translate([0, overall_size.y, overall_size.z]) {
51    rotate([180, 0, 0]) {
52        lid();
53    }
54}