-
Notifications
You must be signed in to change notification settings - Fork 0
/
customiszable-box.scad
67 lines (54 loc) · 1.54 KB
/
customiszable-box.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
$fn = 100;
Width = 75;
Length = 150;
Depth = 50;
Bevel_Radius = 7;
Wall_Thickness = 2;
//Recommended Lid Tolerance: 0.15mm
Lid_Tolerance = 0.2;
Lid_Thickness = 10;
clearance = Lid_Tolerance;
width = Width-2*(Bevel_Radius);
depth = Depth-(Bevel_Radius);
length = Length - 2*(Bevel_Radius);
radius = Bevel_Radius;
lid_height = Lid_Thickness;
thickness = Wall_Thickness;
inside_radius = radius - thickness;
difference (){
group(){
minkowski(){
cube([width,length,depth], center = true);
sphere(radius);
}
}
translate([0,0,thickness + radius/2]){
group(){
minkowski(){
cube([Width-(2*thickness)-2*inside_radius,Length-(2*thickness)-2*inside_radius,Depth], center=true);
sphere(inside_radius);
}
}
}
translate([0,0,(depth/2)+(radius/2)]){
cube([width+40, length+40, radius], center = true);
}
}
translate([Width + 10, 0, -(Depth+radius)/2]){
group(){
translate([0,0]){
linear_extrude(4){
minkowski(){
square([Width-2*radius, Length-2*radius], center=true);
circle(radius);
}
}
}
linear_extrude(lid_height){
minkowski(){
square([Width-(2*thickness)-2*inside_radius - clearance,Length-(2*thickness)-2*inside_radius -clearance], center=true);
circle(inside_radius);
}
}
}
}