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.

cam_adaptor.scad 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Inspired by the "TinyBoy / Fabrikator mini Cam holder"
  3. * by "andy_a":
  4. * http://www.thingiverse.com/thing:1434698
  5. *
  6. * Created by:
  7. * Thomas Buck <xythobuz@xythobuz.de> in April 2016
  8. *
  9. * Licensed under the Creative Commons - Attribution license.
  10. */
  11. height = 10;
  12. wallSize = 3;
  13. screwInner = 2.8;
  14. screwOuter = 6.5;
  15. fitGap = 0.4;
  16. width = 30;
  17. length = 30;
  18. $fn = 20;
  19. // -----------------------------------------------------------
  20. module half_circle(d, h) {
  21. difference() {
  22. cylinder(d = d, h = h);
  23. translate([0, -(d / 2) - 1, -1])
  24. cube([(d / 2) + 1, d + 2, h + 2]);
  25. }
  26. }
  27. module screw() {
  28. difference() {
  29. cylinder(d = screwOuter, h = height);
  30. translate([0, 0, -1])
  31. cylinder(d = screwInner, h = height + 2);
  32. }
  33. }
  34. module quarter_circle(d, h) {
  35. difference() {
  36. cylinder(d = d, h = h);
  37. translate([0, -(d / 2) - 1, -1])
  38. cube([(d / 2) + 1, d + 2, h + 2]);
  39. translate([-(d / 2) - 1, 0, -1])
  40. cube([(d / 2) + 2, (d / 2) + 1, h + 2]);
  41. }
  42. }
  43. module webcam_shaft_center() {
  44. difference() {
  45. cube([9.5, 3.5, 8]);
  46. translate([4.5, 4, 4])
  47. rotate([90, 0, 0])
  48. cylinder(d = 3, h = 4.5);
  49. }
  50. }
  51. module webcam_shaft_end() {
  52. difference() {
  53. union() {
  54. // rectangular part
  55. translate([0, -5.5, 0])
  56. cube([5, 5.5, 9.5]);
  57. // front radius
  58. translate([5, -2.75, 0])
  59. cylinder(d = 5.5, h = 9.5);
  60. translate([0, 0, 9.5])
  61. rotate([90, 0, 0])
  62. quarter_circle(19, 5.5);
  63. }
  64. // axis hole
  65. translate([4.5, -2.75, -1])
  66. cylinder(d = 4.5, h = 11.5);
  67. }
  68. }
  69. module webcam_shaft() {
  70. translate([-0.5, -5.5, 9.5])
  71. webcam_shaft_center();
  72. translate([9, 0, 0])
  73. webcam_shaft_end();
  74. translate([9, -5.5, 27])
  75. rotate([0, 180, 180])
  76. webcam_shaft_end();
  77. }
  78. // -----------------------------------------------------------
  79. module all() {
  80. %translate([9, -9.5 - fitGap, 2])
  81. rotate([90, 0, 180])
  82. webcam_shaft();
  83. difference() {
  84. translate([0, 0, 0])
  85. cube([9.5, 8 - (2 * fitGap), wallSize]);
  86. translate([5, 4 - fitGap, -1])
  87. cylinder(d = 3, h = wallSize + 2);
  88. }
  89. translate([width, height, length])
  90. rotate([90, 0, 0])
  91. screw();
  92. translate([9.5, 0, 0])
  93. cube([width - 10, 8 - (2 * fitGap), wallSize]);
  94. translate([width - (wallSize / 2), 0, 0])
  95. cube([wallSize, 8 - (2 * fitGap), length - 2]);
  96. translate([width / 2, 0, wallSize / 2])
  97. rotate([0, 45, 0])
  98. cube([wallSize / 2, 8 - (2 * fitGap), sqrt(((width / 2) * (width / 2)) + ((length / 2) * (length / 2)))]);
  99. }
  100. translate([width + (screwOuter / 2), 0, 0])
  101. rotate([90, 0, 180])
  102. all();