My self-made 3D-printable designs, mainly in OpenSCAD
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Filament Sensor.scad 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. sensor_width = 7;
  2. sensor_tower_width = 4.5;
  3. sensor_length = 25;
  4. sensor_height = 11;
  5. sensor_gap = 3;
  6. sensor_bottom = 3.5;
  7. sensor_hole_diameter = 3;
  8. sensor_hole_distance = 2.4;
  9. pcb_width = 10.5;
  10. pcb_length = 33;
  11. pcb_height = 1.8;
  12. pcb_sensor_x = 0.25;
  13. pcb_conn_x = 0.7;
  14. conn_length = 5.8;
  15. conn_height = 7;
  16. filament_width = 2;
  17. wall_size = 2;
  18. filament_top_distance = 3;
  19. sensor_y_gap = 0.2;
  20. flag_wall = 0.75;
  21. flag_width = 6.5;
  22. flag_gap = 2;
  23. flag_height = 5;
  24. part = "flag"; // "gantry" or "flag"
  25. $fn = 25;
  26. module sensor() {
  27. difference() {
  28. cube([sensor_length, sensor_width, sensor_bottom]);
  29. translate([sensor_hole_distance, sensor_width / 2, -1])
  30. cylinder(d = sensor_hole_diameter, h = sensor_bottom + 2);
  31. translate([sensor_length - sensor_hole_distance, sensor_width / 2, -1])
  32. cylinder(d = sensor_hole_diameter, h = sensor_bottom + 2);
  33. }
  34. translate([(sensor_length - sensor_gap - (2 * sensor_tower_width)) / 2, 0, sensor_bottom])
  35. cube([sensor_tower_width, sensor_width, sensor_height - sensor_bottom]);
  36. translate([(sensor_length - sensor_gap - (2 * sensor_tower_width)) / 2 + sensor_gap + sensor_tower_width, 0, sensor_bottom])
  37. cube([sensor_tower_width, sensor_width, sensor_height - sensor_bottom]);
  38. }
  39. module pcb() {
  40. difference() {
  41. cube([pcb_length, pcb_width, pcb_height]);
  42. translate([pcb_length - sensor_length - pcb_sensor_x, (pcb_width - sensor_width) / 2, 0])
  43. translate([sensor_hole_distance, sensor_width / 2, -1])
  44. cylinder(d = sensor_hole_diameter, h = pcb_height + 2);
  45. translate([pcb_length - sensor_length - pcb_sensor_x, (pcb_width - sensor_width) / 2, 0])
  46. translate([sensor_length - sensor_hole_distance, sensor_width / 2, -1])
  47. cylinder(d = sensor_hole_diameter, h = pcb_height + 2);
  48. }
  49. translate([pcb_length - sensor_length - pcb_sensor_x, (pcb_width - sensor_width) / 2, pcb_height])
  50. sensor();
  51. translate([pcb_conn_x, 0, -conn_height])
  52. cube([conn_length, pcb_width, conn_height]);
  53. }
  54. module gantry() {
  55. difference() {
  56. cube([sensor_hole_diameter + wall_size, sensor_width + (2 * wall_size), wall_size]);
  57. translate([sensor_hole_distance, wall_size + (sensor_width / 2), -1])
  58. cylinder(d = sensor_hole_diameter, h = wall_size + 2);
  59. }
  60. difference() {
  61. translate([sensor_length - sensor_hole_diameter - wall_size, 0, 0])
  62. cube([sensor_hole_diameter + wall_size, sensor_width + (2 * wall_size), wall_size]);
  63. translate([sensor_length - sensor_hole_distance, wall_size + (sensor_width / 2), -1])
  64. cylinder(d = sensor_hole_diameter, h = wall_size + 2);
  65. }
  66. translate([sensor_hole_diameter + wall_size, 0, 0])
  67. cube([sensor_length - (2 * (sensor_hole_diameter + wall_size)), wall_size - sensor_y_gap, wall_size]);
  68. translate([sensor_hole_diameter + wall_size, sensor_width + wall_size + sensor_y_gap, 0])
  69. cube([sensor_length - (2 * (sensor_hole_diameter + wall_size)), wall_size - sensor_y_gap, wall_size]);
  70. difference() {
  71. translate([sensor_length - (2 * (sensor_tower_width + sensor_gap)), 0, wall_size])
  72. cube([sensor_gap + wall_size, wall_size - sensor_y_gap, sensor_height - sensor_bottom - wall_size]);
  73. translate([sensor_length / 2, wall_size + 1, sensor_height - sensor_bottom - filament_top_distance])
  74. rotate([90, 0, 0])
  75. cylinder(d = filament_width, h = wall_size + 2);
  76. }
  77. difference() {
  78. translate([sensor_length - (2 * (sensor_tower_width + sensor_gap)), sensor_width + wall_size + sensor_y_gap, wall_size])
  79. cube([sensor_gap + wall_size, wall_size - sensor_y_gap, sensor_height - sensor_bottom - wall_size]);
  80. translate([sensor_length / 2, sensor_width + (2 * wall_size) + 1, sensor_height - sensor_bottom - filament_top_distance])
  81. rotate([90, 0, 0])
  82. cylinder(d = filament_width, h = wall_size + 2);
  83. }
  84. }
  85. module flag() {
  86. translate([sensor_length / 2, flag_width + wall_size + (sensor_width - flag_width) / 2, sensor_height - sensor_bottom - filament_top_distance])
  87. rotate([90, 0, 0])
  88. union() {
  89. difference() {
  90. translate([-sensor_gap / 4, (filament_width + flag_wall) / 2 - 0.3, 0])
  91. cube([sensor_gap / 2, flag_height, flag_width]);
  92. translate([-sensor_gap / 4 - 1, (filament_width + flag_wall) / 2 - 0.3, (flag_width - flag_gap) / 2])
  93. cube([sensor_gap / 2 + 2, flag_height + 1, flag_gap]);
  94. }
  95. difference() {
  96. cylinder(d = filament_width + flag_wall, h = flag_width);
  97. translate([0, 0, -1])
  98. cylinder(d = filament_width / 2, h = flag_width + 2);
  99. }
  100. }
  101. }
  102. %translate([-(pcb_length - sensor_length - pcb_sensor_x), (-(pcb_width - sensor_width) / 2) + wall_size, -pcb_height - sensor_bottom])
  103. pcb();
  104. if (part == "gantry") {
  105. gantry();
  106. } else {
  107. %gantry();
  108. }
  109. if (part == "flag") {
  110. flag();
  111. } else {
  112. flag();
  113. }