My self-made 3D-printable designs, mainly in OpenSCAD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

coffee_mill.scad 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. mill_h = 136;
  2. mill_do = 54.9;
  3. mill_di = 48.7;
  4. mill_ih = 13.4;
  5. hat_do_bot = mill_di - 1;
  6. hat_h_bot = mill_ih - 1;
  7. hat_do_top = mill_do;
  8. hat_h_top = 5;
  9. hat_wall = 3;
  10. hat_di_bot = hat_do_bot - 2 * hat_wall;
  11. boot_wall = 3;
  12. boot_h = 20;
  13. boot_support = 5;
  14. boot_di_min = mill_do + 1;
  15. boot_di_max = boot_di_min + 20;
  16. boot_do_min = boot_di_min + 2 * boot_wall;
  17. boot_do_max = boot_di_max + 2 * boot_wall;
  18. rubber_ridge_w = 3;
  19. rubber_ridge_h = 2;
  20. mode = "print"; // [ "hat", "boot", "assembly", "assembly_cut", "print" ]
  21. prev_mode = "inverted"; // [ "normal", "inverted" ]
  22. $fn = $preview ? 42 : 100;
  23. module mill() {
  24. difference() {
  25. cylinder(d = mill_do, h = mill_h);
  26. translate([0, 0, mill_h - mill_ih])
  27. cylinder(d = mill_di, h = mill_ih + 0.1);
  28. translate([0, 0, 5])
  29. cylinder(d = mill_di, h = mill_h - mill_ih - 10);
  30. }
  31. }
  32. module hat() {
  33. difference() {
  34. cylinder(d = hat_do_bot, h = hat_h_bot + 0.1);
  35. translate([0, 0, -0.1])
  36. cylinder(d = hat_di_bot, h = hat_h_bot + 0.2);
  37. }
  38. translate([0, 0, hat_h_bot])
  39. difference() {
  40. cylinder(d = hat_do_top, h = hat_h_top);
  41. translate([0, 0, hat_h_top - rubber_ridge_h / 2])
  42. for (r = [0, 90])
  43. rotate([0, 0, r])
  44. cube([rubber_ridge_w, hat_do_top + 0.2, rubber_ridge_h + 0.1], center = true);
  45. }
  46. }
  47. module boot() {
  48. difference() {
  49. union() {
  50. cylinder(d = boot_do_min, h = boot_wall);
  51. translate([0, 0, boot_wall])
  52. cylinder(d1 = boot_do_min, d2 = boot_do_max, h = boot_h);
  53. }
  54. translate([0, 0, boot_wall - 0.1])
  55. cylinder(d1 = boot_di_min, d2 = boot_di_max, h = boot_h + 0.2);
  56. translate([0, 0, -0.1])
  57. cylinder(d = boot_di_min, h = boot_wall + 0.2);
  58. }
  59. translate([0, 0, boot_wall / 2])
  60. for (r = [0, 90])
  61. rotate([0, 0, r])
  62. cube([boot_di_min, boot_support, boot_wall], center = true);
  63. translate([0, 0, -boot_wall])
  64. difference() {
  65. cylinder(d = hat_do_bot, h = boot_wall);
  66. translate([0, 0, -0.1])
  67. cylinder(d = hat_do_bot - 2 * boot_wall, h = boot_wall + 0.2);
  68. }
  69. translate([0, 0, -boot_wall])
  70. difference() {
  71. cylinder(d = boot_do_min, h = boot_wall);
  72. translate([0, 0, -0.1])
  73. cylinder(d = boot_di_min, h = boot_wall + 0.2);
  74. translate([0, 0, rubber_ridge_h / 2])
  75. for (r = [0, 90])
  76. rotate([0, 0, r])
  77. cube([rubber_ridge_w, boot_do_min + 0.2, rubber_ridge_h + 0.1], center = true);
  78. }
  79. translate([0, 0, -boot_wall + boot_wall / 2])
  80. for (r = [0, 90])
  81. rotate([0, 0, r])
  82. cube([hat_do_bot - 2 * boot_wall, boot_support, boot_wall], center = true);
  83. }
  84. module assembly() {
  85. color("blue")
  86. if ($preview)
  87. translate([0, 0, boot_wall])
  88. mill();
  89. if (prev_mode == "normal") {
  90. color("red")
  91. translate([0, 0, mill_h - hat_h_bot + boot_wall + 0.2])
  92. hat();
  93. color("green")
  94. boot();
  95. } else if (prev_mode == "inverted") {
  96. color("green")
  97. translate([0, 0, mill_h + boot_wall])
  98. boot();
  99. }
  100. }
  101. module print() {
  102. translate([0, 0, hat_h_bot + hat_h_top])
  103. rotate([180, 0, 0])
  104. hat();
  105. translate([hat_do_top / 2 + boot_do_max / 2 + 5, 0, boot_wall])
  106. boot();
  107. }
  108. if (mode == "hat") {
  109. hat();
  110. } else if (mode == "boot") {
  111. boot();
  112. } else if (mode == "print") {
  113. print();
  114. } else if (mode == "assembly") {
  115. assembly();
  116. } else if (mode == "assembly_cut") {
  117. difference() {
  118. assembly();
  119. translate([-100, 0, -10])
  120. cube([200, 100, 200]);
  121. }
  122. }