|
|
@@ -0,0 +1,86 @@
|
|
|
+include <../config/container.scad>
|
|
|
+include <../config/wall.scad>
|
|
|
+include <hook.scad>
|
|
|
+
|
|
|
+module container_base_object(cut_x = 0, cut_y = 0, cut_z = 0) {
|
|
|
+ move_x = (container_width - cut_x - container_rounding * 2) / 2;
|
|
|
+ move_y = (container_depth - cut_y - container_rounding * 2) / 2;
|
|
|
+ move_z = (container_height - cut_z - container_rounding * 2) / 2;
|
|
|
+ rounding = container_rounding;
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ translate([move_x, move_y, -move_z]) {
|
|
|
+ sphere(r = rounding);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([-move_x, move_y, -move_z]) {
|
|
|
+ sphere(r = rounding);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([-move_x, -move_y, -move_z]) {
|
|
|
+ sphere(r = rounding);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move_x, -move_y, -move_z]) {
|
|
|
+ sphere(r = rounding);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move_x, move_y, move_z]) {
|
|
|
+ cylinder(r = rounding, h = rounding, center = true);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([-move_x, move_y, move_z]) {
|
|
|
+ cylinder(r = rounding, h = rounding, center = true);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([-move_x, -move_y, move_z]) {
|
|
|
+ cylinder(r = rounding, h = rounding, center = true);
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move_x, -move_y, move_z]) {
|
|
|
+ cylinder(r = rounding, h = rounding, center = true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module container_cut_object() {
|
|
|
+ cut = container_wall_thickness * 2;
|
|
|
+
|
|
|
+ translate([0, 0, cut / 2]) {
|
|
|
+ container_base_object(cut, cut, cut / 2);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module container_hook_holes_shape() {
|
|
|
+ full_width = container_width - container_width % wall_holes_space;
|
|
|
+ width = full_width - wall_holes_space;
|
|
|
+ move_x = width / 2;
|
|
|
+
|
|
|
+ for (count = [-move_x : wall_holes_space : move_x]) {
|
|
|
+ translate([count, 0]) {
|
|
|
+ hook_mounting_hole_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module container_hook_holes_object() {
|
|
|
+ translate([0, container_depth / 2 + 0.5, 0]) {
|
|
|
+ rotate([90, 0, 0]) {
|
|
|
+ linear_extrude(height = container_wall_thickness + 1) {
|
|
|
+ container_hook_holes_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module container_object() {
|
|
|
+ color(container_color) {
|
|
|
+ render() {
|
|
|
+ difference() {
|
|
|
+ container_base_object();
|
|
|
+ container_cut_object();
|
|
|
+ container_hook_holes_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|