|
|
@@ -1,12 +1,122 @@
|
|
|
include <../config/hanger.scad>
|
|
|
+include <../config/wall.scad>
|
|
|
+include <../config/hook.scad>
|
|
|
+include <../config/thread.scad>
|
|
|
+include <thread.scad>
|
|
|
|
|
|
-module hanger_base_object() {
|
|
|
- module base_round() {
|
|
|
- rotate_extrude(angle = 90) {
|
|
|
+module hanger_object() {
|
|
|
+ module single_hanger_object(move) {
|
|
|
+ module base_shape() {
|
|
|
+ translate([hanger_size / 2, 0]) {
|
|
|
+ circle(r = hanger_thickness / 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module base_object() {
|
|
|
+ rotate([270, 0, 0]) {
|
|
|
+ rotate_extrude(angle = 180 + hanger_angle) {
|
|
|
+ base_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module ending_object() {
|
|
|
+ translate([hanger_size / 2, 0, 0]) {
|
|
|
+ sphere(r = hanger_thickness);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module final_object() {
|
|
|
+ translate([move, hanger_size / 2, 0]) {
|
|
|
+ rotate([0, -hanger_angle, 90]) {
|
|
|
+ base_object();
|
|
|
+ ending_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ final_object();
|
|
|
+ }
|
|
|
+
|
|
|
+ module wall_object() {
|
|
|
+ depth = thread_height + hanger_base_thickness;
|
|
|
+ height = thread_top_diameter + hanger_base_thickness * 2;
|
|
|
+
|
|
|
+ module base_shape() {
|
|
|
+ module ending() {
|
|
|
+ circle(r = depth / 2);
|
|
|
+
|
|
|
+ translate([0, -depth / 4]) {
|
|
|
+ square([depth, depth / 2], center = true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ move_x = hanger_width / 2;
|
|
|
+
|
|
|
+ translate([-move_x, 0]) {
|
|
|
+ ending();
|
|
|
+ }
|
|
|
+
|
|
|
+ translate([move_x, 0]) {
|
|
|
+ ending();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module base_object() {
|
|
|
+ linear_extrude(height = height, center = true) {
|
|
|
+ base_shape();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ module final_object() {
|
|
|
+ difference() {
|
|
|
+ move_y = thread_height / 2
|
|
|
+ - hanger_base_thickness / 2
|
|
|
+ - thread_height / 2;
|
|
|
+
|
|
|
+ width = hanger_width - hanger_width % wall_holes_space;
|
|
|
+ move_x = width / 2;
|
|
|
+
|
|
|
+ base_object();
|
|
|
+
|
|
|
+ for (count = [-move_x : wall_holes_space : move_x]) {
|
|
|
+ translate([count, move_y, 0]) {
|
|
|
+ rotate([270, 0, 0]) {
|
|
|
+ thread_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ render() {
|
|
|
+ translate([0, 0, height / 2]) {
|
|
|
+ final_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-module hanger_object() {
|
|
|
+ module final_object() {
|
|
|
+ base_width = hanger_width - hanger_thickness;
|
|
|
+ width = base_width - base_width % hanger_space;
|
|
|
+ move_x = width / 2;
|
|
|
+
|
|
|
+ for (count = [-move_x : hanger_space : move_x]) {
|
|
|
+ single_hanger_object(count);
|
|
|
+ wall_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ color("#822ad5") {
|
|
|
+ center_y = thread_height / 2
|
|
|
+ + hanger_base_thickness / 2
|
|
|
+ - hanger_size / 2
|
|
|
+ - hanger_thickness / 2;
|
|
|
+
|
|
|
+ translate([0, center_y, 0]) {
|
|
|
+ final_object();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|