use <LEGO.scad/LEGO.scad>;
module qrd1114() {
width=3;
height=3.3;
diam=1.2;
radius=diam/2;
module via() {
translate([0,0,-5]) cylinder(h=10,r=radius,center=false,$fn=12);
}
place(0.5,0.5) {
for (x=[-0.5,0.5],y=[-0.5,0.5]) {
translate([x*width,y*height]) via();
}
}
}
length=29;
width=2;
sensors=[
0, 1.5, 2.5, 3.5, 5,
6, 7.5, 8.5, 9.5, 10.5, 11.5, 13,
14, 15.5, 16.5, 17.5, 19,
20, 21.5, 22.5, 23.5, 24.5, 25.5, 27,
28,
];
difference() {
uncenter(width,length) block(
type="baseplate",
width=width,
length=length,
roadway_width=1,
roadway_length=60,
roadway_x=0,
stud_rescale=0.49/0.48
);
for (x=sensors) {
place(0,x) qrd1114();
}
}