Нема описа
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.

led_ring.scad 990B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. include<../config.scad>;
  2. include<../util.scad>;
  3. led_ring(cutout=true);
  4. module led_ring(cutout=false,extra =0)
  5. {
  6. play=(cutout ? 0.1 : 0);
  7. // pcb ring
  8. color(cutout? "green": "gray")
  9. translate([0,0,-extra + (cutout ? 1.3 : 0)])
  10. difference()
  11. {
  12. cylinder(d=48+play*2,h=1.6 + extra);
  13. eps()
  14. cylinder(d=30.8-play*2,h=1.6 + extra + $e*2);
  15. }
  16. // leds on the ring
  17. for(r=[0:360/16:360])
  18. rotate([0,0,r])
  19. translate([38.8/2,0,$e])
  20. if(cutout==false) {
  21. difference() {
  22. color("white")
  23. translate([-5/2,-5/2,0])
  24. cube([5,5,2.9-$e]);
  25. color([(r/4)%1,(r/7)%1,(r/10)%1])
  26. translate([0,0,2.9-0.3])
  27. cylinder(d1=2.5,d2=3,h=0.3);
  28. }
  29. } else {
  30. hull() {
  31. translate([0,0,2.9])
  32. rotate([0,-30,0])
  33. cylinder(d1=3,d2=10,h=10);
  34. translate([0,0,2.9])
  35. cylinder(d=3,h=$e);
  36. }
  37. }
  38. }