pot.scad 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. include <../config/pot.scad>
  2. include <../config/thread.scad>
  3. module pot_object() {
  4. module base_object(outsize) {
  5. move_z = pot_height / 2 - pot_size / 2;
  6. move_x = thread_diameter / 2 + pot_thickness / 2;
  7. size = outsize / 2;
  8. hull() {
  9. translate([move_x, 0, -move_z]) {
  10. sphere(r = size);
  11. }
  12. translate([move_x, 0, move_z]) {
  13. cylinder(r = size, h = size * 2, center = true);
  14. }
  15. translate([-move_x, 0, -move_z]) {
  16. sphere(r = size);
  17. }
  18. translate([-move_x, 0, move_z]) {
  19. cylinder(r = size, h = size * 2, center = true);
  20. }
  21. }
  22. }
  23. render() {
  24. difference() {
  25. thickness = thread_height + pot_thickness * 2;
  26. base_object(pot_size + thickness);
  27. translate([0, thread_height / 2, thickness / 2]) {
  28. base_object(pot_size);
  29. }
  30. }
  31. }
  32. }