Advertisement
Guest User

OpenSCAD Skadis Hook

a guest
Jun 9th, 2025
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1.  
  2. $fs = $preview ? 1 : 0.2;
  3. $fa = $preview ? 3 : 0.2;
  4.  
  5. vertical_space_between_holes = 25;
  6. horizontal_space_between_holes = 40*2;
  7. hole_height = 15;
  8. hole_hook_height_ratio = 0.8;
  9. hole_width = 4.6;
  10. hole_depth=6;
  11. corner_radius=2;
  12. hook_radius=7;
  13. hook_angle=180;
  14. hook_down_extension=12.5;
  15. hook_up_extension=7;
  16.  
  17.  
  18.  
  19. module rounded_rect(x=1, y=1, radius=1){
  20. hull(){
  21. translate([radius, radius, 0])
  22. circle(r = radius);
  23. translate([x-radius, radius, 0])
  24. circle( r = radius);
  25. translate([radius, y-radius, 0])
  26. circle( r = radius);
  27. translate([x-radius, y-radius, 0])
  28. circle( r = radius);
  29. }
  30. }
  31.  
  32.  
  33.  
  34. module skadis_hook(hole_height_space, hole_height, hole_hook_height_ratio, hole_width, hole_depth, corner_radius, hook_radius,hook_angle, hook_down_extension, hook_up_extension ){
  35. // main shaft body
  36. color("red")
  37. translate([0,0,-hole_width*0.05-hook_down_extension])
  38. translate([0,0,hole_width])
  39. linear_extrude(hole_height_space+hole_width*0.1+hook_down_extension)
  40. rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
  41.  
  42.  
  43. // lower hole insertion
  44. color("green")
  45. linear_extrude(hole_width)
  46. rounded_rect(x=hole_width, y=hole_depth + hole_width, radius=corner_radius);
  47.  
  48. // upper hole insertion
  49. color("green")
  50. translate([0,0,hole_height_space+ hole_width])
  51. linear_extrude(hole_width)
  52. rounded_rect(x=hole_width, y=hole_depth*2 + hole_width, radius=corner_radius);
  53.  
  54.  
  55. //hole_insertion(hole_width = hole_width, hole_depth = hole_depth*2, corner_radius = corner_radius);
  56.  
  57.  
  58. // upper hole hook
  59.  
  60. hook_height= hole_height*hole_hook_height_ratio;
  61. color("yellow")
  62. translate([0,hole_depth*2,hole_height_space+hole_width*2 - hook_height])
  63. linear_extrude(hook_height)
  64. rounded_rect(x=hole_width, y=hole_width, radius = corner_radius);
  65.  
  66. // main hook
  67. translate([0,-hook_radius, -hook_down_extension+hole_width])
  68. rotate([0,90,0])
  69. rotate([0,0,90-hook_angle])
  70. union(){
  71. color("blue")
  72.  
  73. rotate_extrude(angle=hook_angle)
  74. translate([hook_radius, 0 , 0])
  75. rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
  76.  
  77. color("yellow")
  78. translate([hook_radius,.5,0])
  79. rotate([90,0,0])
  80. linear_extrude(hook_up_extension+1)
  81. rounded_rect(x=hole_width, y=hole_width, radius=corner_radius);
  82. }
  83.  
  84. }
  85. /*
  86.  
  87. skadis_hole_width_space= 35;
  88.  
  89. */
  90.  
  91.  
  92.  
  93. rotate([0,90,0])
  94. skadis_hook(
  95. hole_height_space=vertical_space_between_holes+2,
  96. hole_height=hole_height,
  97. hole_hook_height_ratio=hole_hook_height_ratio,
  98. hole_width = hole_width,
  99. hole_depth=hole_depth,
  100. corner_radius=corner_radius,
  101. hook_radius=hook_radius,
  102. hook_angle=hook_angle,
  103. hook_down_extension=hook_down_extension,
  104. hook_up_extension=hook_up_extension);
  105.  
  106.  
  107.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement