diff --git a/readme.md b/readme.md index 783e48f..88b0a5c 100644 --- a/readme.md +++ b/readme.md @@ -2212,6 +2212,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | 1 | ```smd_resistor(RES0603, 1K)``` | SMD resistor 0603 1K 0.1W | | 1 | ```smd_resistor(RES0805, 1K)``` | SMD resistor 0805 1K 0.125W | | 1 | ```smd_resistor(RES1206, 1K)``` | SMD resistor 1206 1K 0.25W | +| 1 | ```square_button(button_4p5mm)``` | Square button 4.5mm | | 1 | ```square_button(button_6mm)``` | Square button 6mm | | 1 | ```pcb(TMC2130)``` | TMC2130 | | 1 | ```green_terminal(gt_5p08, 2)``` | Terminal block 2 way 0.2" | diff --git a/tests/PCB.scad b/tests/PCB.scad index de27bf1..06b2e30 100644 --- a/tests/PCB.scad +++ b/tests/PCB.scad @@ -121,7 +121,8 @@ test_pcb = ["TestPCB", "Test PCB", [ 70, 130, 180, "term35", 3, "lime"], [ 50, 150, 0, "transition", 5], [ 50, 160, 0, "block", 10, 5, 8, "orange"], - [ 50, 170, 0, "button_6mm"], + [ 45, 170, 0, "button_6mm"], + [ 55, 170, 0, "button_4p5mm"], [ 50, 185, 0, "microswitch", small_microswitch], [ 52, 200, 0, "pcb", 11, TMC2130 ], [ 80, 200, 0, "pdip", 24, "27C32", true, inch(0.6) ], diff --git a/tests/png/pcb.png b/tests/png/pcb.png index 5131fe6..484d917 100644 Binary files a/tests/png/pcb.png and b/tests/png/pcb.png differ diff --git a/vitamins/pcb.scad b/vitamins/pcb.scad index 32ad7b6..1c68442 100644 --- a/vitamins/pcb.scad +++ b/vitamins/pcb.scad @@ -940,6 +940,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon if(!cutouts) { // Components that don't have a cutout parameter go in this section if(show(comp, "button_6mm")) square_button(button_6mm); + if(show(comp, "button_4p5mm")) square_button(button_4p5mm); if(show(comp, "microswitch")) translate_z(microswitch_thickness(comp[4])/2) microswitch(comp[4]); if(show(comp, "pcb")) translate_z(comp[4]) pcb(comp[5]); if(show(comp, "standoff")) standoff(comp[4], comp[5], comp[6], comp[7]);