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.

tablet-mount.scad 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. tablet_width = 335;
  2. tablet_height = 223;
  3. tablet_depth = 9.0;
  4. tablet_depth_tolerance = 0.5;
  5. clamp_width = 30;
  6. clamp_height_small = 14;
  7. clamp_height_large = 20;
  8. clamp_wall = 5;
  9. clamp_bottom_dist = 200;
  10. clamp_side_dist = 40;
  11. rail_dia = 8.0;
  12. rail_hole = rail_dia + 0.4;
  13. rail_dist = 2;
  14. rail_add_len = 50;
  15. rail_clamp_width = clamp_width;
  16. rail_clamp_add_height = 4;
  17. rail_clamp_off = 20;
  18. $fn = 20;
  19. print_view = true;
  20. module clamp(height, back_height) {
  21. cube([clamp_width, (2 * clamp_wall) + tablet_depth + tablet_depth_tolerance, clamp_wall]);
  22. translate([0, 0, clamp_wall])
  23. cube([clamp_width, clamp_wall, back_height]);
  24. translate([0, clamp_wall + tablet_depth + tablet_depth_tolerance, clamp_wall])
  25. cube([clamp_width, clamp_wall, height]);
  26. }
  27. module rail_clamp() {
  28. translate([0, -clamp_wall - (rail_hole / 2) - rail_dist, 0])
  29. difference() {
  30. hull() {
  31. translate([0, (clamp_wall + rail_hole + rail_dist) / 2, rail_clamp_width / 2])
  32. cube([rail_hole + (2 * clamp_wall) + rail_clamp_add_height, clamp_wall + rail_dist, rail_clamp_width], center = true);
  33. cylinder(d = rail_hole + (2 * clamp_wall), h = rail_clamp_width);
  34. }
  35. translate([0, 0, -1])
  36. cylinder(d = rail_hole, h = rail_clamp_width + 2);
  37. }
  38. }
  39. module clamp_corner() {
  40. // bottom clamp
  41. translate([(tablet_width - clamp_bottom_dist) / 2, 0, 0])
  42. clamp(clamp_height_small, tablet_height / 2 - (clamp_side_dist / 2));
  43. // side clamp
  44. translate([-clamp_wall, 0, clamp_wall + ((tablet_height) / 2) - (clamp_side_dist / 2)])
  45. rotate([0, 90, 0])
  46. clamp(clamp_height_large, (tablet_width - clamp_bottom_dist) / 2);
  47. // bottom rail mount
  48. translate([(tablet_width - clamp_bottom_dist) / 2, 0, rail_clamp_off])
  49. rotate([0, 90, 0])
  50. rail_clamp();
  51. // side rail mount
  52. translate([rail_clamp_off - 5, 0, clamp_wall + ((tablet_height) / 2) - clamp_width - (clamp_side_dist / 2)])
  53. rail_clamp();
  54. }
  55. module rail_to_rail() {
  56. difference() {
  57. hull() {
  58. translate([rail_clamp_width / 2, 0, rail_clamp_width / 2])
  59. rotate([180, 90, 0])
  60. rail_clamp();
  61. translate([0, 0, 0])
  62. rail_clamp();
  63. }
  64. translate([0, -clamp_wall - (rail_hole / 2) - rail_dist, -1])
  65. cylinder(d = rail_hole, h = rail_clamp_width + 2);
  66. translate([rail_clamp_width / 2 + 1, clamp_wall + (rail_hole / 2) + rail_dist, rail_clamp_width / 2])
  67. rotate([180, 90, 0])
  68. cylinder(d = rail_hole, h = rail_clamp_width + 2);
  69. }
  70. }
  71. module visualization() {
  72. %translate([0, clamp_wall + (tablet_depth_tolerance / 2), clamp_wall])
  73. cube([tablet_width, tablet_depth, tablet_height]);
  74. color("yellow")
  75. clamp_corner();
  76. color("green")
  77. translate([0, 0, tablet_height + (2 * clamp_wall)])
  78. scale([1, 1, -1])
  79. clamp_corner();
  80. color("blue")
  81. translate([tablet_width, 0, 0])
  82. scale([-1, 1, 1])
  83. clamp_corner();
  84. color("red")
  85. translate([tablet_width, 0, tablet_height + (2 * clamp_wall)])
  86. scale([-1, 1, -1])
  87. clamp_corner();
  88. color("cyan")
  89. translate([tablet_width / 2, -rail_clamp_off - 2.5, rail_hole / 2 + 1])
  90. rail_to_rail();
  91. color("cyan")
  92. translate([tablet_width / 2, -rail_clamp_off - 2.5, tablet_height - rail_hole / 2 - rail_clamp_off])
  93. rail_to_rail();
  94. // center rail
  95. translate([tablet_width / 2, -rail_clamp_off * 3 / 2 - rail_hole / 2 + 0.5, -5])
  96. cylinder(d = rail_dia, h = tablet_height + 20);
  97. // top/bottom rails
  98. translate([(tablet_width - clamp_bottom_dist - rail_add_len) / 2, -rail_hole / 2 - rail_dist - 5, clamp_wall + rail_clamp_off - 5])
  99. rotate([0, 90, 0])
  100. cylinder(d = rail_dia, h = clamp_bottom_dist + rail_add_len);
  101. translate([(tablet_width - clamp_bottom_dist - rail_add_len) / 2, -rail_hole / 2 - rail_dist - 5, tablet_height + clamp_wall - rail_clamp_off + 5])
  102. rotate([0, 90, 0])
  103. cylinder(d = rail_dia, h = clamp_bottom_dist + rail_add_len);
  104. // side rails
  105. translate([rail_clamp_off - 5, -rail_hole / 2 - rail_dist - 5, clamp_wall + ((tablet_height - clamp_side_dist - rail_add_len) / 2) - clamp_width])
  106. cylinder(d = rail_dia, h = clamp_side_dist + rail_add_len + (2 * clamp_width));
  107. translate([tablet_width - rail_clamp_off + 5, -rail_hole / 2 - rail_dist - 5, clamp_wall + ((tablet_height - clamp_side_dist - rail_add_len) / 2) - clamp_width])
  108. cylinder(d = rail_dia, h = clamp_side_dist + rail_add_len + (2 * clamp_width));
  109. }
  110. module printplate_corners() {
  111. clamp_corner();
  112. //translate([0, 50, 0])
  113. // rotate([0, 180, 0])
  114. // scale([-1, 1, -1])
  115. // clamp_corner();
  116. //translate([0, 100, clamp_wall])
  117. // rotate([0, 90, 0])
  118. // scale([-1, 1, 1])
  119. // clamp_corner();
  120. //translate([0, 150, clamp_wall])
  121. // rotate([0, -90, 0])
  122. // scale([1, 1, -1])
  123. // clamp_corner();
  124. }
  125. module printplate_rail_to_rail() {
  126. translate([25, 60, 0])
  127. rotate([0, 0, -90]) {
  128. rail_to_rail();
  129. translate([rail_clamp_width + 10, 0, 0])
  130. rail_to_rail();
  131. }
  132. }
  133. if (print_view) {
  134. printplate_corners();
  135. //printplate_rail_to_rail();
  136. } else {
  137. visualization();
  138. }