| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- include <../config/platform.scad>
- include <../config/thread.scad>
- include <corner.scad>
- include <wall.scad>
- function platform_full_support_depth()
- = platform_support_depth
- + thread_height
- + platform_thickness;
- module platform_mount_object() {
- rounding = corner_radius;
- holes_width
- = platform_width
- - rounding * 2
- - thread_screw * 2
- - platform_side_thickness * 2;
- holes_height
- = platform_height
- - rounding * 2
- - thread_screw * 2
- - platform_side_thickness;
- module base_shape() {
- move_x = platform_width / 2 - rounding;
- move_y = platform_height / 2 - rounding;
-
- hull() {
- corner(move_x, move_y);
- corner(-move_x, move_y);
- corner(move_x, -move_y);
- corner(-move_x, -move_y);
- }
- }
-
- base_thickness
- = platform_thickness
- + thread_height;
- module base_object() {
- linear_extrude(height = base_thickness, center = true) {
- base_shape();
- }
- }
- module bottom_object() {
- center = base_thickness / 2 - thread_height / 2;
- render() {
- difference() {
- base_object();
-
- translate([0, 0, center]) {
- rotate([180, 0, 0]) {
- width = holes_width;
- height = holes_height;
- thickness = platform_thickness;
- wall_thread_object(width, height, thickness);
- }
- }
- }
- }
- }
- module side_shape() {
- module cutout_shape() {
- move_x
- = platform_width / 2
- - platform_side_thickness
- - rounding;
- move_top_y
- = platform_height / 2
- - platform_side_thickness
- - rounding;
-
- move_bottom_y
- = -platform_height / 2
- + rounding;
- hull() {
- corner(move_x, move_top_y);
- corner(-move_x, move_top_y);
- corner(move_x, move_bottom_y, false);
- corner(-move_x, move_bottom_y, false);
- }
- }
- module bottom_cutout_shape() {
- bottom
- = rounding / 2
- - platform_height / 2;
-
- translate([0, bottom]) {
- square([platform_width, rounding], center = true);
- }
- }
- render() {
- difference() {
- base_shape();
- cutout_shape();
- bottom_cutout_shape();
- }
- }
- }
- module side_object() {
- thickness = platform_support_depth;
- linear_extrude(height = thickness, center = true) {
- side_shape();
- }
- }
- bottom_center
- = thread_height / 2
- + platform_thickness / 2
- - platform_full_support_depth() / 2;
- side_center
- = platform_support_depth / 2
- + thread_height
- + platform_thickness
- - platform_full_support_depth() / 2;
- translate([0, 0, bottom_center]) {
- bottom_object();
- }
- translate([0, 0, side_center]) {
- side_object();
- }
- }
|