wall_spacer.scad 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. include <../config/wall_spacer.scad>
  2. include <../config/wall.scad>
  3. module wall_spacer_contact_shape() {
  4. outside = wall_mounting_screws + wall_spacer_contact_margin;
  5. inside = wall_mounting_screws;
  6. difference() {
  7. circle(r = outside / 2);
  8. circle(r = inside / 2);
  9. }
  10. }
  11. module wall_spacer_contact_object() {
  12. linear_extrude(height = wall_spacer_contact_height) {
  13. wall_spacer_contact_shape();
  14. }
  15. }
  16. module wall_spacer_top_shape() {
  17. outside = wall_mounting_screws + wall_spacer_margin;
  18. inside = wall_mounting_screws;
  19. difference() {
  20. circle(r = outside / 2);
  21. circle(r = inside / 2);
  22. }
  23. }
  24. module wall_spacer_top_object() {
  25. top_height = wall_spacer_full_height - wall_spacer_contact_height;
  26. linear_extrude(height = top_height) {
  27. wall_spacer_top_shape();
  28. }
  29. }
  30. module wall_spacer_object() {
  31. color(wall_spacer_color) {
  32. wall_spacer_contact_object();
  33. translate([0, 0, wall_spacer_contact_height]) {
  34. wall_spacer_top_object();
  35. }
  36. }
  37. }