mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-14 19:33:57 +02:00
PCB chip compoment can now be round if width is zero to fake round buttons.
This commit is contained in:
@@ -2339,7 +2339,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| `barrel_jack(cutout = false)` | Draw barrel power jack |
|
||||
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
|
||||
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
|
||||
| `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, or cylinder if width is zero |
|
||||
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
|
||||
| `flex(cutout = false)` | Draw flexistrip connector |
|
||||
| `hdmi(type, cutout = false)` | Draw HDMI socket |
|
||||
|
@@ -88,10 +88,13 @@ module pcb_hole_positions(type, all = true) { // Position children at the hole p
|
||||
module pcb_screw_positions(type) //! Positions children at the mounting hole positions
|
||||
pcb_hole_positions(type, false) children();
|
||||
|
||||
module chip(length, width, thickness, colour, cutout = false) //! Draw a coloured cube to represent a chip, or other rectangular component
|
||||
module chip(length, width, thickness, colour, cutout = false) //! Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero
|
||||
if(!cutout)
|
||||
color(colour)
|
||||
translate_z(thickness / 2) cube([length, width, thickness], center = true);
|
||||
if(width)
|
||||
translate_z(thickness / 2) cube([length, width, thickness], center = true);
|
||||
else
|
||||
cylinder(d = length, h = thickness);
|
||||
|
||||
module usb_A_tongue() {
|
||||
l = 9;
|
||||
|
Reference in New Issue
Block a user