Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/photo_interrupters.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Binary file modified tests/png/photo_interrupters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion vitamins/photo_interrupter.scad
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions vitamins/photo_interrupters.scad
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
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 <photo_interrupter.scad>