hook.scad 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. include <../config/hook.scad>
  2. include <../config/hole.scad>
  3. include <../config/wall.scad>
  4. module hook_mounting_hole_shape() {
  5. circle(r = hook_mounting_hole / 2);
  6. }
  7. module hook_entrance_shape() {
  8. outside_radius = (hole_entrance - hook_entrance_margin) / 2;
  9. difference() {
  10. circle(r = outside_radius);
  11. hook_mounting_hole_shape();
  12. }
  13. }
  14. module hook_entrance_object() {
  15. linear_extrude(height = hook_entrance_height) {
  16. hook_entrance_shape();
  17. }
  18. }
  19. module hook_holding_shape() {
  20. outside_radius = (hole_holding - hook_holding_margin) / 2;
  21. difference() {
  22. circle(r = outside_radius);
  23. hook_mounting_hole_shape();
  24. }
  25. }
  26. module hook_holding_object() {
  27. linear_extrude(height = wall_thickness + hook_holding_height_margin) {
  28. hook_holding_shape();
  29. }
  30. }
  31. module hook_object() {
  32. color(hook_color) {
  33. hook_entrance_object();
  34. translate([0, 0, hook_entrance_height]) {
  35. hook_holding_object();
  36. }
  37. }
  38. }