-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfreezer.scad
88 lines (78 loc) · 2.12 KB
/
freezer.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ // Part parameters
// - Overall dimensions
length = 26;
width = 14;
height = 6;
corner_diameter = 3;
plate_increase = 2;
plate_height = 1;
$fn = 200;
}
module main_part() {
corner_adjustment = corner_diameter/2;
adjusted_length = length - corner_adjustment;
adjusted_width = width - corner_adjustment;
// Main shape
translate([corner_adjustment, corner_adjustment]) {
cube([adjusted_length, adjusted_width, height]);
}
// Four corners
translate([corner_adjustment, corner_adjustment]) {
cylinder(d=corner_diameter, h=height);
}
translate([corner_adjustment, adjusted_width + corner_adjustment]) {
cylinder(d=corner_diameter, h=height);
}
translate([adjusted_length + corner_adjustment,
adjusted_width + corner_adjustment]) {
cylinder(d=corner_diameter, h=height);
}
translate([adjusted_length + corner_adjustment,
corner_adjustment]) {
cylinder(d=corner_diameter, h=height);
}
// Missing sides
translate([corner_adjustment, 0]) {
cube([adjusted_length, corner_adjustment, height]);
}
translate([corner_adjustment, corner_adjustment+adjusted_width]) {
cube([adjusted_length, corner_adjustment, height]);
}
translate([0, corner_adjustment]) {
cube([corner_adjustment, adjusted_width, height]);
}
translate([corner_adjustment + adjusted_length, corner_adjustment]) {
cube([corner_adjustment, adjusted_width, height]);
}
}
module hole() {
// Screw hole
hole_center_x = length/2;
hole_center_y = width/2;
hole_through_diameter = 3;
hole_top_diameter = 6;
hole_top_depth = 3;
translate([hole_center_x, hole_center_y]) {
cylinder(d=hole_through_diameter, h=height);
}
translate([hole_center_x, hole_center_y, height - hole_top_depth]) {
cylinder(d=hole_top_diameter, hole_top_depth);
}
}
module plate() {
plate_length = length + 2.5*plate_increase;
plate_width = width + 2.5*plate_increase;
translate([-plate_increase, -plate_increase]) {
cube([plate_length, plate_width, plate_height]);
}
}
module part() {
difference() {
union() {
main_part();
plate();
}
hole();
}
}
part();