| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- include <hole.scad>
- include <../config/wall.scad>
- module wall_base_shape() {
- move_x = wall_width / 2 - wall_rounding;
- move_y = wall_height / 2 - wall_rounding;
-
- hull() {
- translate([move_x, move_y]) {
- circle(r = wall_rounding);
- }
- translate([move_x, -move_y]) {
- circle(r = wall_rounding);
- }
- translate([-move_x, -move_y]) {
- circle(r = wall_rounding);
- }
- translate([-move_x, move_y]) {
- circle(r = wall_rounding);
- }
- }
- }
- module wall_mount_screws() {
- move_x = wall_width / 2 - wall_mounting_screws;
- move_y = wall_height / 2 - wall_mounting_screws;
- translate([move_x, move_y]) {
- circle(r = wall_mounting_screws / 2);
- }
- translate([move_x, -move_y]) {
- circle(r = wall_mounting_screws / 2);
- }
- translate([-move_x, -move_y]) {
- circle(r = wall_mounting_screws / 2);
- }
- translate([-move_x, move_y]) {
- circle(r = wall_mounting_screws / 2);
- }
- }
- module wall_holes_on_x() {
- width_without_screws_margin = wall_width - wall_mounting_screws * 3;
- width_without_margin = width_without_screws_margin - entrance_hole * 2;
- width = width_without_margin - width_without_margin % wall_holes_space;
- for (count = [-width / 2 : wall_holes_space : width / 2]) {
- translate([count, 0]) {
- hole();
- }
- }
- }
- module wall_holes() {
- hole_height = entrance_hole * 2 + holding_hole * 3;
- height_without_screws_margin = wall_height - wall_mounting_screws * 3;
- height_without_margin = height_without_screws_margin - hole_height;
- height = height_without_margin - height_without_margin % wall_holes_space;
- for (count = [-height / 2 : wall_holes_space : height / 2]) {
- translate([0, count]) {
- wall_holes_on_x();
- }
- }
- }
- module wall_with_mount_screw() {
- difference() {
- wall_base_shape();
- wall_mount_screws();
- }
- }
- module wall() {
- difference() {
- wall_with_mount_screw();
- wall_holes();
- }
- }
|