wall_screw_narrowing.scad 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. include <../config/wall.scad>
  2. include <../config/wall_screw_narrowing.scad>
  3. module wall_screw_narrowing_top_object() {
  4. diameter = wall_mounting_screws + wall_screw_narrowing_margin * 2;
  5. screw = wall_screw_narrowing_hole;
  6. thickness = wall_screw_narrowing_thickness;
  7. module base_shape() {
  8. difference() {
  9. circle(r = diameter / 2);
  10. circle(r = screw / 2);
  11. }
  12. }
  13. difference() {
  14. linear_extrude(height = thickness) {
  15. base_shape();
  16. }
  17. translate([0, 0, screw]) {
  18. sphere(r = screw);
  19. }
  20. }
  21. }
  22. module wall_screw_narrowing_bottom_object() {
  23. diameter = wall_mounting_screws;
  24. screw = wall_screw_narrowing_hole;
  25. thickness = wall_thickness + wall_screw_narrowing_thickness_margin;
  26. module base_shape() {
  27. difference() {
  28. circle(r = diameter / 2);
  29. circle(r = screw / 2);
  30. }
  31. }
  32. linear_extrude(height = thickness) {
  33. base_shape();
  34. }
  35. }
  36. module wall_screw_narrowing_object() {
  37. bottom_thickness = wall_thickness + wall_screw_narrowing_thickness_margin;
  38. move_z_base = (bottom_thickness + wall_screw_narrowing_thickness) / 2;
  39. move_z = move_z_base - wall_screw_narrowing_thickness;
  40. translate([0, 0, move_z]) {
  41. wall_screw_narrowing_top_object();
  42. translate([0, 0, -bottom_thickness]) {
  43. wall_screw_narrowing_bottom_object();
  44. }
  45. }
  46. }