|
|
@@ -0,0 +1,141 @@
|
|
|
+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();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|