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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. $fn = 100;
  2. base = 35;
  3. body = 20;
  4. module rc(a, b, c, r, to) {
  5. hull() {
  6. if (to)
  7. translate([0, 0, r])
  8. cube([a, b, c - r * 2]);
  9. else
  10. cube([a, b, c - r]);
  11. for (y = [r, b - r])
  12. translate([0, y, c - r])
  13. rotate([0, 90, 0])
  14. cylinder(r = r, h = a);
  15. if (to)
  16. for (y = [r, b - r])
  17. translate([0, y, r])
  18. rotate([0, 90, 0])
  19. cylinder(r = r, h = a);
  20. }
  21. }
  22. module stem() {
  23. translate([-152, 36, 0])
  24. cube([106, 4, 2]);
  25. hull() {
  26. #translate([-34.5, 10, 0])
  27. cube([4.5, 0.1, 2]);
  28. #translate([-50, 39.9, 0])
  29. cube([4, 0.1, 2]);
  30. }
  31. }
  32. // https://www.thingiverse.com/thing:776622
  33. module glasses() {
  34. f = body / 122;
  35. scale([f, f, f])
  36. translate([0, -61, -40])
  37. union() {
  38. translate([-10, -24, -20])
  39. rotate([90, 0, -90])
  40. import("dealwithit_main_hole.stl");
  41. for (y = [0, 124])
  42. rotate([90, 0, 0])
  43. translate([138, 0, -y])
  44. //import("dealwithit_stem.stl");
  45. stem();
  46. }
  47. }
  48. // https://openhome.cc/eGossip/OpenSCAD/SectorArc.html
  49. module sector(radius, angles, fn = $fn) {
  50. r = radius / cos(180 / fn);
  51. step = -360 / fn;
  52. points = concat([[0, 0]],
  53. [for(a = [angles[0] : step : angles[1] - 360])
  54. [r * cos(a), r * sin(a)]
  55. ],
  56. [[r * cos(angles[1]), r * sin(angles[1])]]
  57. );
  58. difference() {
  59. circle(radius, $fn = fn);
  60. polygon(points);
  61. }
  62. }
  63. module arc(radius, angles, width = 1, fn = $fn) {
  64. difference() {
  65. sector(radius + width, angles, fn);
  66. sector(radius, angles, fn);
  67. }
  68. }
  69. module glas() {
  70. difference() {
  71. cylinder(d1 = 9, d2 = 12, h = 20);
  72. translate([0, 0, 1])
  73. scale([0.8, 0.8, 1.1])
  74. cylinder(d1 = 9, d2 = 12, h = 20);
  75. }
  76. }
  77. module gripper() {
  78. difference() {
  79. cylinder(d = 12, h = 3);
  80. translate([-20, -10, -10])
  81. cube([20, 20, 20]);
  82. translate([0, 0, -1])
  83. cylinder(d = 5.5, h = 5);
  84. }
  85. }
  86. module arm() {
  87. hull() {
  88. translate([5, 0, -5.5])
  89. rotate([0, 90, 0])
  90. cylinder(d = 5, h = 1);
  91. translate([15, -5, -10])
  92. rotate([0, 90, -45])
  93. cylinder(d = 5, h = 1);
  94. }
  95. hull() {
  96. translate([15, -5, -10])
  97. rotate([0, 90, -45])
  98. cylinder(d = 5, h = 1);
  99. translate([22, -15, 0])
  100. rotate([0, 90, -90])
  101. cylinder(d = 5, h = 1);
  102. }
  103. translate([0, 0, -7])
  104. gripper();
  105. // glass
  106. rotate([180, 0, 0])
  107. scale(0.6)
  108. glas();
  109. }
  110. module marvin() {
  111. // base
  112. color("green")
  113. hull() {
  114. translate([0, 0, 10])
  115. rotate([0, 90, 0])
  116. rc(10, base, base, 3, true);
  117. translate([(base - body) / 2, (base - body) / 2, 15])
  118. cube([body, body, 1]);
  119. }
  120. // feet
  121. color("blue")
  122. for (x = [3, base - 3])
  123. for (y = [3, base - 3])
  124. translate([x, y, 0])
  125. sphere(r = 3);
  126. // body
  127. translate([(base - body) / 2, (base - body) / 2, 15]) {
  128. difference() {
  129. rc(body, body, 40, 2, false);
  130. // face
  131. translate([-1, 2.5, 25.5])
  132. rc(2, 15, 12, 2, true);
  133. }
  134. // mouth
  135. color("yellow")
  136. translate([-1, 2.5, 25.5])
  137. translate([2.5, 4, 0])
  138. rotate([0, -90, 0])
  139. rotate([0, 0, -50])
  140. linear_extrude(1.7)
  141. arc(3, [10, 120], 1);
  142. }
  143. // arm
  144. translate([-2, 42, -3]) {
  145. translate([0, 0, 40])
  146. arm();
  147. //%cylinder(d = 0.2, h = 40);
  148. // puddle
  149. //cylinder(d = 10, h = 0.5);
  150. // TODO ice cubes
  151. }
  152. // glasses
  153. color("black")
  154. translate([base / 2 - 8.3, base / 2, 50.5])
  155. glasses();
  156. // lamp
  157. color("red")
  158. translate([base / 2, base / 2, 55])
  159. sphere(r = 2);
  160. }
  161. translate([0, 0, 3])
  162. marvin();