1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-01-17 05:28:14 +01:00

Added copper colour constant.

Copper PCB pads and veroboard tracks now use copper colour.
This commit is contained in:
Chris Palmer 2021-06-06 17:17:33 +01:00
parent f3bfbbfcf2
commit 9cd2dbc316
4 changed files with 6 additions and 4 deletions

View File

@ -54,9 +54,10 @@ $fs = extrusion_width / 2;
function round_to_layer(z) = ceil(z / layer_height) * layer_height;
// Some additional named colours
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
gold = [255/255, 215/255, 0/255];
brass = [255/255, 220/255, 100/255];
silver = [0.75, 0.75, 0.75];
gold = [255, 215, 0] / 255;
brass = [255, 220, 100] / 255;
copper = [230, 140, 51] / 255;
/*
* Enums

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View File

@ -1055,7 +1055,8 @@ module pcb(type) { //! Draw specified PCB
fr4 = pcb_colour(type) != "sienna";
plating = 0.15;
color(pcb_colour(type) == "green" ? "silver" : "gold")
pcb_colour = pcb_colour(type);
color(pcb_colour == "green" ? silver : pcb_colour == "sienna" ? copper : gold)
translate_z(-plating)
linear_extrude(fr4 ? t + 2 * plating : plating)
if(Len(grid)) {

View File

@ -83,7 +83,7 @@ module veroboard(type) { //! Draw specified veroboard with missing tracks and tr
hole_d = 1;
tw = vero_track_width(type);
colour = vero_fr4(type) ? "green" : "goldenrod";
tc = vero_fr4(type) ? "silver" : "darkorange";
tc = vero_fr4(type) ? "silver" : copper;
no_track = vero_no_track(type);
vitamin(str("veroboard(", type[0], "): Veroboard ", holes, " holes x ", strips, "strips"));