--- /dev/null
+// Diffuser for ZHISHUNJIA ZSJ-T29 LED flashlight (dx.com SKU #317226).
+infty = 100;
+eps = 0.01;
+
+diaphragm = 0.5; // diaphragm thickness
+wall = 1.5;
+
+ring_h = 12; // the height of the body
+ring_d = 34.3 + 0.5; // the lens ring diameter + tolerance
+
+clip_h = 7.3 + 0.5; // height of the clip above the diaphragm
+clip_dist = 1.5;
+clip_size = 1.2;
+
+
+module diffuser() {
+ difference() {
+ cylinder(r = ring_d/2 + wall, h = ring_h);
+ translate([0, 0, diaphragm])
+ cylinder(r = ring_d/2, h = ring_h);
+ for (angle = [0:120:360]) rotate([0,0,60+angle]) {
+ translate([0, 0, 20+clip_h])
+ rotate([0, 90, 0])
+ cylinder(r=20, h=infty);
+ }
+ }
+ for (angle = [0:120:360]) rotate([0,0,angle]) {
+ intersection() {
+ hull() {
+ translate([ring_d/2-clip_dist, -infty/2, clip_h])
+ cube([infty, infty, clip_size]);
+ translate([ring_d/2+wall/2, -eps/2, ring_h+wall])
+ cube([eps, eps, eps]);
+ }
+ cylinder(r = ring_d/2 + wall/2, h = ring_h);
+ }
+ }
+}
+
+diffuser();
+