hook.scad 895 B

123456789101112131415161718192021222324252627282930313233343536
  1. thickness = 6; // The thickness of each length of plastic
  2. width = 25; // The the total width of the hook
  3. height = 150; // The total height of the hook
  4. top_hang = 15;
  5. top_curl = 30;
  6. bottom_hang = 20;
  7. bottom_curl = 25;
  8. module length(size) {
  9. cube([width, thickness, size]);
  10. }
  11. module hook() {
  12. length(height);
  13. translate([0, 0, height - (thickness)])
  14. rotate([90, 0, 0])
  15. length(top_hang);
  16. translate([0, -top_hang - thickness, height - top_curl - thickness])
  17. length(top_curl + thickness);
  18. translate([0, bottom_hang + thickness, 0])
  19. rotate([90, 0, 0])
  20. length(bottom_hang);
  21. translate([0, bottom_hang + thickness])
  22. length(bottom_curl + thickness);
  23. }
  24. // It's best to print the hook lying on its side
  25. // comment out these two lines to work with XYZ
  26. // relative to how it would actually bee hooked up
  27. translate([0, 0, width])
  28. rotate([0, 90, 0])
  29. hook();