- sensor();
- // pcb clip
- translate([-clip_h/2, -pcb_y/2, pcb_h-pcb_thick-clip_r/2])
- rotate([0, 90, 0])
- cylinder(r=clip_r, h = clip_h, $fn = 4);
- }
- // mount holes
- for (x = [0, 180]) rotate([0, 0, x]) {
- translate([pcb_x/2+wall, -screw_sp/2, wall])
- cube([screw_sp +wall+eps, screw_sp, pcb_h + cyl_h + eps]);
- translate([pcb_x/2+1+wall, -3/2, -eps])
- cube([3, 3, wall + 2*eps]);
+ case_body();
+ difference() {
+ sensor();
+ // pcb clip
+ translate([-clip_h/2, -pcb_y/2, pcb_h-pcb_thick-clip_r/2])
+ rotate([0, 90, 0])
+ cylinder(r=clip_r, h = clip_h, $fn = 4);
+ }
+ // mount holes
+ for (x = [-1, 1]) scale([x, 1, 1]) {
+ translate([pcb_x/2+wall, -screw_head/2, screw_base])
+ cube([screw_head+eps, screw_head, infty]);
+ // screw hole
+ translate([pcb_x/2+wall+screw_head/2-screw_d/2, -screw_d/2, -eps])
+ cube([screw_d, screw_d, infty]);
+ }
+ // text
+ translate([0, 3.5, pcb_h + cyl_h + eps])
+ rotate([0, 0, 90])
+ linear_extrude(height=wall)
+ text("CVT FI", font="DejaVu Sans:style=Bold", size=5,
+ halign="center", valign="center");