Added 4.5mm button to PCBs.

This commit is contained in:
Chris Palmer 2020-09-11 12:30:00 +01:00
parent 81eb183db9
commit 8d8df3cb8a
4 changed files with 4 additions and 1 deletions

View File

@ -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" |

View File

@ -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) ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -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]);