| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- 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 * 2;
- width_without_margin = width_without_screws_margin - hole_entrance * 2;
- width = width_without_margin - width_without_margin % wall_holes_space;
- for (count = [-width / 2 : wall_holes_space : width / 2]) {
- translate([count, 0]) {
- hole_shape();
- }
- }
- }
- module wall_holes() {
- hole_height = hole_entrance * 2 + hole_holding * 3;
- height_without_screws_margin = wall_height - wall_mounting_screws * 2;
- 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_shape() {
- difference() {
- wall_with_mount_screw();
- wall_holes();
- }
- }
- module wall_object() {
- color(wall_color) {
- linear_extrude(height = wall_thickness) {
- wall_shape();
- }
- }
- }
|