diff --git a/global_defs.scad b/global_defs.scad index c07b381..5d57ec9 100644 --- a/global_defs.scad +++ b/global_defs.scad @@ -51,7 +51,7 @@ $fa = 6; $fs = extrusion_width / 2; function round_to_layer(z) = ceil(z / layer_height) * layer_height; -// Some additional named colors +// Some additional named colours grey20 = [0.2, 0.2, 0.2]; grey30 = [0.3, 0.3, 0.3]; grey40 = [0.4, 0.4, 0.4]; diff --git a/readme.md b/readme.md index 22dc598..398c584 100644 --- a/readme.md +++ b/readme.md @@ -1905,7 +1905,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | Module | Description | |:--- |:--- | | ```barrel_jack(cutout = false)``` | Draw barrel power jack | -| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and color | +| ```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 | | ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 | | ```flex(cutout = false)``` | Draw flexistrip connector | @@ -1991,7 +1991,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | Module | Description | |:--- |:--- | | ```barrel_jack(cutout = false)``` | Draw barrel power jack | -| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and color | +| ```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 | | ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 | | ```flex(cutout = false)``` | Draw flexistrip connector | @@ -2749,7 +2749,7 @@ The "Soft" parameter can be used to determinesif the sheet material needs machin * If soft, wood screws will be used, with a pilot hole. * If not soft, either tapped holes or a clearance hole and nuts will be used to retain screws. -The "Color" parameter is a quad-array: [R, G, B, Alpha], or can be a named color, see [OpenSCAD_User_Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#color). +The "Colour" parameter is a quad-array: [R, G, B, Alpha], or can be a named colour, see [OpenSCAD_User_Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#color). For speed sheets should be modelled in 2D by subtracting holes from 2D templates made by ```sheet_2D()``` and then extruded to 3D with ```render_2D_sheet()```. Note that modules that drill holes will return a 2D object if ```h``` is set to 0 to facilitate this. @@ -2771,8 +2771,8 @@ Note that modules that drill holes will return a 2D object if ```h``` is set to ### Modules | Module | Description | |:--- |:--- | -| ```render_2D_sheet(type, color = false)``` | Extrude a 2D sheet template and give it the correct colour | -| ```render_sheet(type, color = false)``` | Render a sheet in the correct colour after holes have been subtracted | +| ```render_2D_sheet(type, colour = false)``` | Extrude a 2D sheet template and give it the correct colour | +| ```render_sheet(type, colour = false)``` | Render a sheet in the correct colour after holes have been subtracted | | ```sheet(type, w, d, corners = [0, 0, 0, 0])``` | Draw specified sheet | | ```sheet_2D(type, w, d, corners = [0, 0, 0, 0])``` | 2D sheet template with specified size and optionally rounded corners | @@ -3492,7 +3492,7 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c | ```cable_tie_holes(cable_r, h = 100)``` | Holes to thread a ziptie through a panel to make a cable tie. | | ```mouse_hole(cable, h = 100, teardrop = false)``` | A mouse hole to allow a panel to go over a wire bundle. | | ```ribbon_cable(ways, length)``` | Add ribbon cable to the BOM | -| ```wire(color, strands, length, strand = 0.2)``` | Add stranded wire to the BOM | +| ```wire(colour, strands, length, strand = 0.2)``` | Add stranded wire to the BOM | ![wire](tests/png/wire.png) diff --git a/vitamins/pcb.scad b/vitamins/pcb.scad index 3150ba0..289cc84 100644 --- a/vitamins/pcb.scad +++ b/vitamins/pcb.scad @@ -209,7 +209,7 @@ module jack(cutout = false) { //! Draw 3.5mm jack } } -module buzzer(height, diameter, colour) { //! Draw PCB buzzer with specified height, diameter and color +module buzzer(height, diameter, colour) { //! Draw PCB buzzer with specified height, diameter and colour color (colour) tube(or = diameter / 2, ir = height > 5 ? 1 : 0.75, h = height, center = false); color("white") diff --git a/vitamins/sheet.scad b/vitamins/sheet.scad index ae0c374..5225139 100644 --- a/vitamins/sheet.scad +++ b/vitamins/sheet.scad @@ -25,7 +25,7 @@ //! * If soft, wood screws will be used, with a pilot hole. //! * If not soft, either tapped holes or a clearance hole and nuts will be used to retain screws. //! -//! The "Color" parameter is a quad-array: [R, G, B, Alpha], or can be a named color, see [OpenSCAD_User_Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#color). +//! The "Colour" parameter is a quad-array: [R, G, B, Alpha], or can be a named colour, see [OpenSCAD_User_Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#color). //! //! For speed sheets should be modelled in 2D by subtracting holes from 2D templates made by ```sheet_2D()``` and then extruded to 3D with ```render_2D_sheet()```. //! Note that modules that drill holes will return a 2D object if ```h``` is set to 0 to facilitate this. @@ -78,11 +78,11 @@ module sheet(type, w, d, corners = [0, 0, 0, 0]) //! Draw specified sheet linear_extrude(sheet_thickness(type), center = true) sheet_2D(type, w, d, corners); -module render_sheet(type, color = false) //! Render a sheet in the correct colour after holes have been subtracted - color(color ? color : sheet_colour(type)) +module render_sheet(type, colour = false) //! Render a sheet in the correct colour after holes have been subtracted + color(colour ? colour : sheet_colour(type)) render() children(); -module render_2D_sheet(type, color = false) //! Extrude a 2D sheet template and give it the correct colour - color(color ? color : sheet_colour(type)) +module render_2D_sheet(type, colour = false) //! Extrude a 2D sheet template and give it the correct colour + color(colour ? colour : sheet_colour(type)) linear_extrude(sheet_thickness(type), center = true) children(); diff --git a/vitamins/wire.scad b/vitamins/wire.scad index c2b4a41..a51699e 100644 --- a/vitamins/wire.scad +++ b/vitamins/wire.scad @@ -23,8 +23,8 @@ include <../utils/core/core.scad> include -module wire(color, strands, length, strand = 0.2) //! Add stranded wire to the BOM - vitamin(str(": Wire ", color, " ", strands, "/", strand, "mm strands, length ",length, "mm")); +module wire(colour, strands, length, strand = 0.2) //! Add stranded wire to the BOM + vitamin(str(": Wire ", colour, " ", strands, "/", strand, "mm strands, length ",length, "mm")); module ribbon_cable(ways, length) //! Add ribbon cable to the BOM vitamin(str(": Ribbon cable ", ways, " way ", length, "mm")); diff --git a/vitamins/zipties.scad b/vitamins/zipties.scad index a098987..41a10d3 100644 --- a/vitamins/zipties.scad +++ b/vitamins/zipties.scad @@ -17,7 +17,7 @@ // If not, see . // -// [width, thickness, [latch_x, latch_y, latch_z], color, tail] +// [width, thickness, [latch_x, latch_y, latch_z], colour, tail] small_ziptie = ["small_ziptie", 2.5, 1.0, [4.7, 4.25, 3.0], "white", 25]; ziptie_3mm = ["ziptie_3mm", 3.0, 1.0, [5.4, 5.44, 4.5], "white", 25]; ziptie_3p6mm = ["ziptie_3p6mm", 3.6, 1.2, [6.4, 6.62, 4.7], "white", 25];