mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 15:23:51 -05:00
Merge branch 'martinbudden-pcb_buzzer'
This commit is contained in:
commit
7090c714ce
@ -1760,6 +1760,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
||||||
|
| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and color |
|
||||||
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
||||||
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
||||||
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
||||||
|
@ -200,6 +200,13 @@ module jack(cutout = false) { //! Draw 3.5mm jack
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module buzzer(height, diameter, colour) { //! Draw PCB buzzer with specified height, diameter and color
|
||||||
|
color (colour)
|
||||||
|
tube(or = diameter / 2, ir = height > 5 ? 1 : 0.75, h = height);
|
||||||
|
color("white")
|
||||||
|
cylinder(d = 2, h = max(height - 3 , 0.5));
|
||||||
|
}
|
||||||
|
|
||||||
function hdmi_depth(type) = type[2]; //! Front to back depth
|
function hdmi_depth(type) = type[2]; //! Front to back depth
|
||||||
function hdmi_width1(type) = type[3]; //! Inside width at the top
|
function hdmi_width1(type) = type[3]; //! Inside width at the top
|
||||||
function hdmi_width2(type) = type[4]; //! Inside width at the bottom
|
function hdmi_width2(type) = type[4]; //! Inside width at the bottom
|
||||||
@ -710,6 +717,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
|||||||
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
||||||
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
||||||
if(show(comp, "usb_B")) usb_B(cutouts);
|
if(show(comp, "usb_B")) usb_B(cutouts);
|
||||||
|
if(show(comp, "buzzer")) buzzer(param(4, 9), param(5, 12), param(6, grey20));
|
||||||
if(show(comp, "jack")) jack(cutouts);
|
if(show(comp, "jack")) jack(cutouts);
|
||||||
if(show(comp, "barrel_jack")) barrel_jack(cutouts);
|
if(show(comp, "barrel_jack")) barrel_jack(cutouts);
|
||||||
if(show(comp, "hdmi")) hdmi(hdmi_full, cutouts);
|
if(show(comp, "hdmi")) hdmi(hdmi_full, cutouts);
|
||||||
|
Loading…
Reference in New Issue
Block a user