87 lines
2.9 KiB
OpenSCAD
87 lines
2.9 KiB
OpenSCAD
height=148;
|
|
width=80;
|
|
thickness=2;
|
|
difference() {
|
|
cube([height,width,thickness]);
|
|
|
|
// corner cutouts
|
|
corner_radius=9;
|
|
translate([0,0,-0.5]) {
|
|
cylinder(thickness+1, corner_radius, corner_radius);
|
|
}
|
|
translate([0,width,-0.5]) {
|
|
cylinder(thickness+1, corner_radius, corner_radius);
|
|
}
|
|
translate([height,0,-0.5]) {
|
|
cylinder(thickness+1, corner_radius, corner_radius);
|
|
}
|
|
translate([height,width,-0.5]) {
|
|
cylinder(thickness+1, corner_radius, corner_radius);
|
|
}
|
|
|
|
// mounting holes
|
|
mounting_hole_radius=1.25;
|
|
x_distance=18;
|
|
y_distance=3.5;
|
|
translate([y_distance,x_distance,-0.5]) {
|
|
cylinder(thickness+1, mounting_hole_radius, mounting_hole_radius);
|
|
}
|
|
translate([y_distance,width-x_distance,-0.5]) {
|
|
cylinder(thickness+1, mounting_hole_radius, mounting_hole_radius);
|
|
}
|
|
translate([height-y_distance,x_distance,-0.5]) {
|
|
cylinder(thickness+1, mounting_hole_radius, mounting_hole_radius);
|
|
}
|
|
translate([height-y_distance,width-x_distance,-0.5]) {
|
|
cylinder(thickness+1, mounting_hole_radius, mounting_hole_radius);
|
|
}
|
|
|
|
// battery mounting holes
|
|
battery_mounting_hole_radius=1.25;
|
|
for(i=[1:3]) {
|
|
translate([i*37.5-9,28,-0.5]) {
|
|
cylinder(thickness+1, battery_mounting_hole_radius, battery_mounting_hole_radius);
|
|
}
|
|
translate([i*37.5-9,width-28,-0.5]) {
|
|
cylinder(thickness+1, battery_mounting_hole_radius, battery_mounting_hole_radius);
|
|
}
|
|
}
|
|
|
|
// xiao mounting point
|
|
xiao_pin_header_distance=15;
|
|
xiao_pin_header_length=17;
|
|
y_offset=10;
|
|
cable_tie_slot_length=6;
|
|
translate([height-9.5-xiao_pin_header_distance,y_offset,-0.5]) {
|
|
cube([1.5, xiao_pin_header_length, thickness+1]);
|
|
}
|
|
translate([height-9.5,y_offset,-0.5]) {
|
|
cube([1.5, xiao_pin_header_length, thickness+1]);
|
|
translate([-cable_tie_slot_length/2+1.5/2-xiao_pin_header_distance/2,-5,0]) {
|
|
cube([cable_tie_slot_length, 2, thickness+1]);
|
|
}
|
|
translate([-cable_tie_slot_length/2+1.5/2-xiao_pin_header_distance/2,xiao_pin_header_length+3,0]) {
|
|
cube([cable_tie_slot_length, 2, thickness+1]);
|
|
}
|
|
}
|
|
|
|
// sensor module mounting holes
|
|
sensor_module_mounting_hole_radius=1.25;
|
|
sensor_mount_distance=8;
|
|
for(i=[1:3]) {
|
|
translate([height-i*sensor_mount_distance-2,width-12,-0.5]) {
|
|
cylinder(thickness+1, sensor_module_mounting_hole_radius, sensor_module_mounting_hole_radius);
|
|
}
|
|
translate([height-i*sensor_mount_distance-2,width-30,-0.5]) {
|
|
cylinder(thickness+1, sensor_module_mounting_hole_radius, sensor_module_mounting_hole_radius);
|
|
}
|
|
}
|
|
|
|
// air valve cutout
|
|
air_valve_cutout_width=10;
|
|
translate([-0.5,width/2-air_valve_cutout_width/2,-0.5]) {
|
|
cube([8+0.5, air_valve_cutout_width, thickness+1]);
|
|
}
|
|
}
|
|
|
|
$fn=70;
|