50 lines
1.2 KiB
OpenSCAD
50 lines
1.2 KiB
OpenSCAD
pcb_width = 25.3;
|
|
pcb_height = 34.5;
|
|
pcb_thickness = 1.25;
|
|
|
|
usb_height = 5.2;
|
|
usb_width = 7.75;
|
|
usb_thickness = 2.6;
|
|
usb_offset = 10;
|
|
|
|
esp_height = 15;
|
|
esp_width = 12;
|
|
esp_thickness = 4.75;
|
|
esp_offset_x = 7;
|
|
esp_offset_y = 7.5;
|
|
|
|
esp_board_thickness = 1;
|
|
esp_board_height = 24.25;
|
|
esp_board_width = 16;
|
|
esp_board_offset = 5.25;
|
|
|
|
wemos_d1_mini = [pcb_width,
|
|
pcb_height,
|
|
usb_thickness + pcb_thickness + esp_thickness];
|
|
|
|
module wemos_d1_mini(box=false, box_alpha=0.4) {
|
|
|
|
union() {
|
|
color("blue")
|
|
translate([0,0,usb_thickness])
|
|
cube([pcb_width, pcb_height, pcb_thickness]);
|
|
translate([usb_offset, pcb_height - usb_height, 0])
|
|
color("silver")
|
|
cube([usb_width, usb_height, usb_thickness]);
|
|
translate([esp_board_offset,
|
|
0,
|
|
usb_thickness + pcb_thickness])
|
|
color("black")
|
|
cube([esp_board_width, esp_board_height, esp_board_thickness]);
|
|
translate([esp_offset_x,
|
|
esp_offset_y,
|
|
pcb_thickness + usb_thickness])
|
|
color("silver")
|
|
cube([esp_width, esp_height, esp_thickness]);
|
|
}
|
|
|
|
if (box) {
|
|
color("gold", box_alpha)
|
|
cube(wemos_d1_mini);
|
|
}
|
|
}
|