Pārlūkot izejas kodu

Update hook, add gitignore

Billy Barrow 1 dienu atpakaļ
vecāks
revīzija
1685c2b6dc
2 mainītis faili ar 22 papildinājumiem un 12 dzēšanām
  1. 2 1
      .gitignore
  2. 20 11
      hook/hook.scad

+ 2 - 1
.gitignore

@@ -1 +1,2 @@
-*.stl
+*.stl
+*.gcode

+ 20 - 11
hook/hook.scad

@@ -10,18 +10,27 @@ module length(size) {
     cube([width, thickness, size]);
 }
 
-length(height);
+module hook() {
+    length(height);
 
-translate([0, 0, height - thickness])
-rotate([90, 0, 0])
-length(top_hang);
+    translate([0, 0, height - thickness])
+    rotate([90, 0, 0])
+    length(top_hang);
 
-translate([0, -top_hang - thickness, height - top_curl - thickness])
-length(top_curl + thickness);
+    translate([0, -top_hang - thickness, height - top_curl - thickness])
+    length(top_curl + thickness);
 
-translate([0, bottom_hang + thickness, 0]) 
-rotate([90, 0, 0])
-length(bottom_hang);
+    translate([0, bottom_hang + thickness, 0]) 
+    rotate([90, 0, 0])
+    length(bottom_hang);
 
-translate([0, bottom_hang + thickness])
-length(bottom_curl + thickness);
+    translate([0, bottom_hang + thickness])
+    length(bottom_curl + thickness);
+}
+
+// It's best to print the hook lying on its side
+// comment out these two lines to work with XYZ 
+// relative to how it would actually bee hooked up
+translate([0, 0, width])
+rotate([0, 90, 0])
+hook();