diff --git a/tests/photo_interrupters.scad b/tests/photo_interrupters.scad
index 3468cee9..b481330e 100644
--- a/tests/photo_interrupters.scad
+++ b/tests/photo_interrupters.scad
@@ -22,7 +22,7 @@ include <../vitamins/photo_interrupters.scad>
use <../utils/layout.scad>
module photo_interrupters()
- layout([for(l = photo_interrupters) pi_base_length(l)], 5, true)
+ layout([for(l = photo_interrupters) pi_base_length(l)], 10, true)
photo_interrupter(photo_interrupters[$i]);
photo_interrupters();
diff --git a/tests/png/photo_interrupters.png b/tests/png/photo_interrupters.png
index 5fd35f54..0167d133 100644
Binary files a/tests/png/photo_interrupters.png and b/tests/png/photo_interrupters.png differ
diff --git a/vitamins/photo_interrupter.scad b/vitamins/photo_interrupter.scad
index c9f4bfb0..0fb0100a 100644
--- a/vitamins/photo_interrupter.scad
+++ b/vitamins/photo_interrupter.scad
@@ -88,7 +88,8 @@ module photo_interrupter(type) { //! Draw the photo interrupter, with PCB
translate([-pi_base_width(type)/2, pi_gap_width(type)/2, 0])
cube([pi_base_width(type), pi_stem_width(type), pi_gap_height(type) + pi_base_height(type)]);
}
- pi_pcb(type);
+ if (!is_undef(pi_pcb(type)))
+ pi_pcb(type);
}
module pi_cutout(type) { //! Shape to subtract for fitting a photo interrupter
diff --git a/vitamins/photo_interrupters.scad b/vitamins/photo_interrupters.scad
index 83bc38fa..bc13254c 100644
--- a/vitamins/photo_interrupters.scad
+++ b/vitamins/photo_interrupters.scad
@@ -16,8 +16,9 @@
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see .
//
-PH1 = ["PH1", 6.4, 25.9 , 3.5, 8.6, 4.1, 5.9, 3, grey(20), [22, 20, 1.6, true, 11-3.2, 0, "blue",[[8.3, -7.5], [8.3, 7.5]], 3]];
+PH1 = ["PH1", 6.4, 25.9 , 3.5, 8.6, 4.1, 5.9, 3, grey(20), [22, 20, 1.6, true, 11-3.2, 0, "blue",[[8.3, -7.5], [8.3, 7.5]], 3]];
+ITR9608 = ["ITR-9608", 6, 12, 2, 8, 3.8, 5, 0, grey(20)];
-photo_interrupters = [PH1];
+photo_interrupters = [PH1, ITR9608];
use