| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 | 
							- include <../config/platform.scad>
 
- include <../config/thread.scad>
 
- include <../config/wall.scad>
 
- include <../config/hook.scad>
 
- include <thread.scad>
 
- function platform_mount_holes_move_x() = (
 
-     platform_support_depth / 2
 
-     - platform_rounding
 
-     - thread_top_diameter / 2
 
- );
 
- function platform_mount_holes_move_y() = (
 
-     platform_support_thickness / 2
 
-     - platform_rounding
 
-     - thread_top_diameter / 2
 
- );
 
- function platform_mount_holes() = [
 
-     [-platform_mount_holes_move_x(), 0],
 
-     [-platform_mount_holes_move_x(), platform_mount_holes_move_y()],
 
-     [-platform_mount_holes_move_x(), -platform_mount_holes_move_y()],
 
-     [platform_mount_holes_move_x(), platform_mount_holes_move_y()],
 
-     [platform_mount_holes_move_x(), -platform_mount_holes_move_y()],
 
- ];
 
- module platform_support_object() {
 
-     module base_shape() {
 
-         move_x = platform_support_depth / 2 - platform_rounding;
 
-         move_y = platform_support_height / 2 - platform_rounding;
 
-         size = platform_rounding;
 
-         
 
-         hull() {
 
-             translate([-move_x, move_y]) {
 
-                 square(size * 2, center = true);
 
-             }
 
-             translate([move_x, move_y]) {
 
-                 circle(r = size);
 
-             }
 
-             translate([-move_x, -move_y]) {
 
-                 circle(r = size);
 
-             }
 
-         }
 
-     }
 
-     module base_object() {
 
-         thickness = platform_support_thickness;
 
-         rotate([90, 0, 0]) {
 
-             linear_extrude(height = thickness, center = true) {
 
-                 base_shape();
 
-             }
 
-         }
 
-     }
 
-     module base_thread_object() {
 
-         oversize = max(
 
-             platform_support_depth, 
 
-             platform_support_height
 
-         );
 
-         render() {
 
-             thread_object(false, oversize);
 
-         }
 
-     }
 
-     module wall_thread_object(move_y = 0, move_z = 0) {
 
-         move_x = -platform_support_depth / 2
 
-         + thread_height / 2
 
-         + platform_support_screw_thickness;
 
-         translate([move_x, move_y, move_z]) {
 
-             rotate([0, 270, 0]) {
 
-                 base_thread_object();
 
-             }
 
-         }
 
-     }   
 
-     module wall_threads_object() {
 
-         base_move_y = platform_support_thickness
 
-         - platform_support_thickness % wall_holes_space;
 
-         base_move_z = platform_support_height
 
-         - platform_support_height % wall_holes_space;
 
-         move_y = base_move_y / 2;
 
-         move_z = base_move_z / 2;
 
-         for (count_y = [-move_y : wall_holes_space : move_y]) {
 
-             for (count_z = [-move_z : wall_holes_space : move_z]) {
 
-                 wall_thread_object(count_y, count_z);
 
-             }
 
-         }
 
-     }
 
-     module platform_thread_object(move_x, move_y) {
 
-         move_z = platform_support_height / 2
 
-         - thread_height / 2
 
-         - platform_support_screw_thickness;
 
-         translate([move_x, move_y, move_z]) {
 
-             base_thread_object();
 
-         }
 
-     }
 
-     module platform_threads_object() {
 
-         for (count = platform_mount_holes()) {
 
-             platform_thread_object(count.x, count.y);
 
-         }
 
-     }
 
-     color("#239ddc") {
 
-         render() {
 
-             difference() {
 
-                 base_object();
 
-                 wall_threads_object();
 
-                 platform_threads_object();
 
-             }
 
-         }
 
-     }
 
- }
 
- module platform_shape() {
 
-     module base_shape() {
 
-         move_x = platform_width / 2 - platform_rounding;
 
-         move_y = platform_depth / 2 - platform_rounding;
 
-         hull() {
 
-             translate([move_x, move_y]) {
 
-                 circle(r = platform_rounding);
 
-             }
 
-             translate([-move_x, move_y]) {
 
-                 circle(r = platform_rounding);
 
-             }
 
-             translate([move_x, -move_y]) {
 
-                 square(platform_rounding * 2, center = true);
 
-             }
 
-             translate([-move_x, -move_y]) {
 
-                 square(platform_rounding * 2, center = true);
 
-             }
 
-         }
 
-     }
 
-     module bonding_holes() {
 
-         for (count = platform_mount_holes()) {
 
-             move_y = count.x 
 
-             - platform_depth / 2 
 
-             + platform_support_depth / 2;
 
-             translate([count.y, move_y]) {
 
-                 circle(r = thread_screw / 2); 
 
-             }   
 
-         }
 
-         move_x = platform_width / 2 - platform_rounding;
 
-         top_y = platform_depth / 2 - platform_rounding;
 
-         bottom_y = platform_support_depth - top_y;
 
-         center_y = platform_support_depth / 2;
 
-         translate([move_x, top_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-         translate([-move_x, top_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-         translate([move_x, bottom_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-         translate([-move_x, bottom_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-         translate([-move_x, center_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-         translate([move_x, center_y]) {
 
-             circle(r = thread_screw / 2);
 
-         }
 
-     }
 
-     module mounting_holes() {
 
-         top_y = platform_mounting_holes_spacing / 2
 
-         + platform_mounting_holes_move;
 
-         bottom_y = -platform_mounting_holes_spacing / 2
 
-         + platform_mounting_holes_move;
 
-         translate([0, top_y]) {
 
-             circle(r = platform_mounting_screw / 2);
 
-         }
 
-         translate([0, bottom_y]) {
 
-             circle(r = platform_mounting_screw / 2);
 
-         }
 
-     }
 
-     
 
-     module useable_holes() {
 
-         move_x = platform_width / 2
 
-         - hook_mounting_hole / 2
 
-         - platform_rounding * 2;
 
-         top_y = platform_depth / 2
 
-         - hook_mounting_hole / 2
 
-         - platform_rounding * 4
 
-         - wall_holes_space / 2;
 
-         bottom_y = platform_support_depth
 
-         - top_y;
 
-         translate([move_x, top_y - wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([move_x, top_y + wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([-move_x, top_y - wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([-move_x, top_y + wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([move_x, bottom_y - wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([move_x, bottom_y + wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([-move_x, bottom_y - wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-         translate([-move_x, bottom_y + wall_holes_space / 2]) {
 
-             circle(r = hook_mounting_hole / 2);
 
-         }
 
-     }
 
-     difference() {
 
-         base_shape();
 
-         bonding_holes();
 
-         mounting_holes();
 
-         useable_holes();
 
-     }
 
- }
 
- module platform_object() {
 
-     color("#9bdf20") {
 
-         render() {
 
-             linear_extrude(height = platform_thickness, center = true) {
 
-                 platform_shape();
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |