| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 | 
							- include <../config/nail_mount.scad>
 
- include <../config/nail.scad>
 
- include <../config/wall.scad>
 
- include <nail.scad>
 
- include <thread.scad>
 
- function nail_mount_full_height() = 
 
-     nail_mount_bottom_thickness
 
-     + nail_mount_wall_spacer_height
 
-     + wall_thickness
 
-     - nail_mount_wall_insertion_thickness_margin;
 
- module nail_mount_object() {
 
-     module bottom_shape() {
 
-         radius = wall_mounting_screws / 2 
 
-         + nail_mount_padding
 
-         + nail_mount_wall_spacer_diameter_padding / 2;
 
-         
 
-         module base() {
 
-             circle(r = radius);
 
-         }
 
-         nail_move = radius - nail_mount_padding / 2;
 
-         
 
-         difference() {
 
-             base();
 
-             nail_hole_shape(nail_move, 0);
 
-             nail_hole_shape(-nail_move, 0);
 
-             nail_hole_shape(0, nail_move);
 
-             nail_hole_shape(0, -nail_move);
 
-         }
 
-     }
 
-     module bottom_object() {
 
-         thickness = nail_mount_bottom_thickness;
 
-         
 
-         linear_extrude(height = thickness, center = true) {
 
-             bottom_shape();
 
-         }
 
-     }
 
-     module wall_spacer_shape() {
 
-         radius = wall_mounting_screws / 2
 
-         + nail_mount_wall_spacer_diameter_padding / 2;
 
-         circle(r = radius);
 
-     }
 
-     module wall_spacer_object() {
 
-         thickness = nail_mount_wall_spacer_height;
 
-         linear_extrude(height = thickness, center = true) {
 
-             wall_spacer_shape();
 
-         }
 
-     }
 
-     module wall_insertion_shape() {
 
-         radius = wall_mounting_screws / 2;
 
-         circle(r = radius);
 
-     }
 
-     module wall_insertion_object() {
 
-         thickness = wall_thickness 
 
-         - nail_mount_wall_insertion_thickness_margin;
 
-         linear_extrude(height = thickness, center = true) {
 
-             wall_insertion_shape();
 
-         }
 
-     }
 
-     move_bottom = nail_mount_bottom_thickness / 2 
 
-     - nail_mount_full_height() / 2;
 
-     
 
-     move_spacer = nail_mount_wall_spacer_height / 2
 
-     + nail_mount_bottom_thickness
 
-     - nail_mount_full_height() / 2;
 
-     move_insertion = wall_thickness / 2
 
-     - nail_mount_wall_insertion_thickness_margin / 2
 
-     + nail_mount_wall_spacer_height
 
-     + nail_mount_bottom_thickness
 
-     - nail_mount_full_height() / 2;
 
-     module base_object() {
 
-         translate([0, 0, move_bottom]) {
 
-             bottom_object();
 
-         }
 
-         translate([0, 0, move_spacer]) {
 
-             wall_spacer_object();
 
-         }
 
-         translate([0, 0, move_insertion]) {
 
-             wall_insertion_object();
 
-         }
 
-     }
 
-     module thread() {
 
-         position = nail_mount_full_height() / 2
 
-         - thread_height / 2
 
-         - nail_mount_thread_thickness;
 
-         translate([0, 0, position]) {
 
-             thread_object(false, nail_mount_full_height());
 
-         }
 
-     }
 
-     color("#8440bf") {
 
-         render() {
 
-             difference() {
 
-                 base_object();
 
-                 thread();
 
-             }
 
-         }
 
-     }
 
- }
 
- module nail_mount_pressure_shape() {
 
-     outside = wall_mounting_screws / 2 
 
-     + nail_mount_pressure_padding;
 
-     inside = thread_screw / 2;
 
-     difference() {
 
-         circle(r = outside);
 
-         circle(r = inside);
 
-     }
 
- }
 
- module nail_mount_pressure_object() {
 
-     thickness = nail_mount_pressure_thickness;
 
-     color("#7BBF40") {
 
-         render() {
 
-             linear_extrude(height = thickness, center = true) {
 
-                 nail_mount_pressure_shape();
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |