From 654571a70e87e12bf7ca818cc0fd244531c6f46b Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Sun, 29 Mar 2020 20:39:17 +0100 Subject: [PATCH] Colour now always spelt colour except the call to color(). --- readme.md | 4 ++-- vitamins/cable_strip.scad | 8 ++++---- vitamins/d_connector.scad | 18 +++++++++--------- vitamins/kp_pillow_block.scad | 4 ++-- vitamins/microswitch.scad | 4 ++-- vitamins/rail.scad | 10 +++++----- vitamins/scs_bearing_block.scad | 4 ++-- vitamins/sk_bracket.scad | 4 ++-- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/readme.md b/readme.md index 1b4d5f4..22dc598 100644 --- a/readme.md +++ b/readme.md @@ -2387,10 +2387,10 @@ Linear rails with carriages. ### Modules | Module | Description | |:--- |:--- | -| ```carriage(type, rail, end_color = grey20, wiper_color = grey20)``` | Draw the specified carriage | +| ```carriage(type, rail, end_colour = grey20, wiper_colour = grey20)``` | Draw the specified carriage | | ```carriage_hole_positions(type)``` | Position children over screw holes | | ```rail(type, length)``` | Draw the specified rail | -| ```rail_assembly(type, length, pos, carriage_end_color = grey20, carriage_wiper_color = grey20)``` | Rail and carriage assembly | +| ```rail_assembly(type, length, pos, carriage_end_colour = grey20, carriage_wiper_colour = grey20)``` | Rail and carriage assembly | | ```rail_hole_positions(type, length, first = 0, screws = 100, both_ends = true)``` | Position children over screw holes | | ```rail_screws(type, length, thickness, screws = 100)``` | Place screws in the rail | diff --git a/vitamins/cable_strip.scad b/vitamins/cable_strip.scad index ed0d93d..daf7df6 100644 --- a/vitamins/cable_strip.scad +++ b/vitamins/cable_strip.scad @@ -34,7 +34,7 @@ function cable_strip_thickness() = cable_strip_thickness; use <../utils/bezier.scad> use <../utils/sweep.scad> -cable_strip_color = "green"; +cable_strip_colour = "green"; function cable_strip_control_points(depth, min_z, pos) = let(z = min(min_z, min_z + pos)) [ @@ -62,7 +62,7 @@ module bezier_cable_strip(ways, depth, length, below, extra, pos = 0) { //! Draw path = [v[0] + extra_v, each bezier_path(v, steps), v[3] + extra_v]; - color(cable_strip_color) + color(cable_strip_colour) translate_z(-extra) sweep(path, rectangle_points(width, thickness)); *echo(cable_strip_lengh = length); @@ -89,7 +89,7 @@ module cable_strip(ways, depth, travel, extra = 15, pos = 0) { //! Draw a cable vitamin(str("cable_strip(", ways, ", ", depth, ", ", travel, arg(extra, 15), "): Polypropylene strip ", total, "mm x ", w, "mm x ", thickness, "mm")); - color(cable_strip_color) linear_extrude(w, center = true, convexity = 4) + color(cable_strip_colour) linear_extrude(w, center = true, convexity = 4) difference() { union() { translate([-bottom, radius]) @@ -142,7 +142,7 @@ module elliptical_cable_strip(ways, p1, p2, pmax, extra = 15) { [delta[2] / delta[0], 0, 1, delta[2] / 2], [0, 0, 0, 1] ]) - color(cable_strip_color) linear_extrude(w, center = true, convexity = 4) + color(cable_strip_colour) linear_extrude(w, center = true, convexity = 4) difference() { union() { square([(a + thickness) * 2, extra * 2], center = true); diff --git a/vitamins/d_connector.scad b/vitamins/d_connector.scad index 4d4c198..b2abdc7 100644 --- a/vitamins/d_connector.scad +++ b/vitamins/d_connector.scad @@ -23,9 +23,9 @@ include <../utils/core/core.scad> use <../utils/thread.scad> -d_pillar_color = grey90; -d_plug_shell_color = grey80; -d_plug_insulator_color = grey20; +d_pillar_colour = grey90; +d_plug_shell_colour = grey80; +d_plug_insulator_colour = grey20; function d_flange_length(type) = type[1]; //! Length of the flange function d_lengths(type) = type[2]; //! Lengths of the D for plug and socket @@ -56,12 +56,12 @@ module d_pillar() { //! Draw a pillar for a D-connector translate_z(-screw_length) if(show_threads) - male_metric_thread(screw, pitch, screw_length, false, top = 0, colour = d_pillar_color); + male_metric_thread(screw, pitch, screw_length, false, top = 0, colour = d_pillar_colour); else - color(d_pillar_color) + color(d_pillar_colour) cylinder(d = screw, h = screw_length + 1); - color(d_pillar_color) { + color(d_pillar_colour) { linear_extrude(height) difference() { circle(r = rad, $fn = 6); @@ -69,7 +69,7 @@ module d_pillar() { //! Draw a pillar for a D-connector } } if(show_threads) - female_metric_thread(screw, pitch, height, false, colour = d_pillar_color); + female_metric_thread(screw, pitch, height, false, colour = d_pillar_colour); } module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket @@ -106,7 +106,7 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi // // Shell // - color(d_plug_shell_color) { + color(d_plug_shell_colour) { linear_extrude( d_flange_thickness(type)) difference() { rounded_square([flange_length, flange_width], 2); @@ -130,7 +130,7 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi // // Insulator // - color(d_plug_insulator_color) { + color(d_plug_insulator_colour) { translate_z(d_flange_thickness(type) + eps) rotate([0, 180, 0]) linear_extrude(back_height + 1 + d_flange_thickness(type), convexity = 5) diff --git a/vitamins/kp_pillow_block.scad b/vitamins/kp_pillow_block.scad index 78a4bb1..51c9898 100644 --- a/vitamins/kp_pillow_block.scad +++ b/vitamins/kp_pillow_block.scad @@ -25,7 +25,7 @@ use <../utils/tube.scad> use use -kp_pillow_block_color = grey70; +kp_pillow_block_colour = grey70; function kp_diameter(type) = type[1]; //! Rod hole diameter function kp_hole_offset(type) = type[2]; //! Rod hole offset @@ -50,7 +50,7 @@ module kp_pillow_block(type) { //! Draw the KP pillow block b = type[11]; bolthole_radius = type[12]; - color(kp_pillow_block_color) + color(kp_pillow_block_colour) translate([0, -H, 0]) { fillet = 1; squareSizeX = (L - H0) / 2 + fillet; diff --git a/vitamins/microswitch.scad b/vitamins/microswitch.scad index ce394f1..c0e2608 100644 --- a/vitamins/microswitch.scad +++ b/vitamins/microswitch.scad @@ -22,7 +22,7 @@ // include <../utils/core/core.scad> -microswitch_contact_color = brass; +microswitch_contact_colour = brass; function microswitch_thickness(type) = type[2]; //! Body thickness function microswitch_width(type) = type[3]; //! Body width @@ -81,7 +81,7 @@ module microswitch(type) { //! Draw specified microswitch circle(d = d); } - color(microswitch_contact_color) // yellow contacts + color(microswitch_contact_colour) // yellow contacts for(pos = microswitch_legs(type)) translate(pos) { leg = microswitch_leg(type); diff --git a/vitamins/rail.scad b/vitamins/rail.scad index 3406f3f..5e0e46c 100644 --- a/vitamins/rail.scad +++ b/vitamins/rail.scad @@ -65,7 +65,7 @@ module carriage_hole_positions(type) { //! Position children over screw holes children(); } -module carriage(type, rail, end_color = grey20, wiper_color = grey20) { //! Draw the specified carriage +module carriage(type, rail, end_colour = grey20, wiper_colour = grey20) { //! Draw the specified carriage total_l = carriage_length(type); block_l = carriage_block_length(type); block_w = carriage_width(type); @@ -104,13 +104,13 @@ module carriage(type, rail, end_color = grey20, wiper_color = grey20) { //! Draw module carriage_end(type, end_w, end_h, end_l) { wiper_length = 0.5; - color(wiper_color) translate_z(-end_l/2) linear_extrude(wiper_length) + color(wiper_colour) translate_z(-end_l/2) linear_extrude(wiper_length) difference() { translate([-end_w/2, carriage_clearance(type)]) square([end_w, end_h]); cutout(); } - color(end_color) translate_z(wiper_length-end_l/2) linear_extrude(end_l-wiper_length) + color(end_colour) translate_z(wiper_length-end_l/2) linear_extrude(end_l-wiper_length) difference() { translate([-end_w/2, carriage_clearance(type)]) square([end_w, end_h]); @@ -166,11 +166,11 @@ module rail(type, length) { //! Draw the specified rail } } -module rail_assembly(type, length, pos, carriage_end_color = grey20, carriage_wiper_color = grey20) { //! Rail and carriage assembly +module rail_assembly(type, length, pos, carriage_end_colour = grey20, carriage_wiper_colour = grey20) { //! Rail and carriage assembly rail(type, length); translate([pos, 0]) - carriage(rail_carriage(type), type, carriage_end_color, carriage_wiper_color); + carriage(rail_carriage(type), type, carriage_end_colour, carriage_wiper_colour); } diff --git a/vitamins/scs_bearing_block.scad b/vitamins/scs_bearing_block.scad index 670a5fe..12c64a2 100644 --- a/vitamins/scs_bearing_block.scad +++ b/vitamins/scs_bearing_block.scad @@ -41,7 +41,7 @@ function scs_circlip(type) = type[15]; //! Circlip used function scs_spacer(type) = type[16]; //! Spacer used in long bearings -sks_bearing_block_color = grey90; +sks_bearing_block_colour = grey90; module scs_bearing_block(type) { //! Draw the specified SCS bearing block vitamin(str("scs_bearing_block(", type[0], "): ", type[0], " bearing block")); @@ -71,7 +71,7 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block boltHoleRadius = screw_clearance_radius(S1); footHeight = min(0.75, (G - bearing_dia(bearing) - 1.5) / 2); // estimate, not specified on drawings - color(sks_bearing_block_color) { + color(sks_bearing_block_colour) { linear_extrude(L, center = true) { bearingRadius = bearing_dia(bearing) / 2; // center section with bearing hole diff --git a/vitamins/sk_bracket.scad b/vitamins/sk_bracket.scad index fa3724a..2e82d71 100644 --- a/vitamins/sk_bracket.scad +++ b/vitamins/sk_bracket.scad @@ -24,7 +24,7 @@ include <../utils/fillet.scad> use -sk_bracket_color = grey70; +sk_bracket_colour = grey70; function sk_diameter(type) = type[1]; //! Rod hole diameter function sk_hole_offset(type) = type[2]; //! Rod hole offset @@ -47,7 +47,7 @@ module sk_bracket(type) { //! SK shaft support bracket S = type[10]; bolthole_radius = type[11]; - color(sk_bracket_color) { + color(sk_bracket_colour) { translate([0 , -h, 0]) { fillet = 0.5; rotate([-90, 0, 0])