mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-06 15:36:30 +02:00
Added copper colour constant.
Copper PCB pads and veroboard tracks now use copper colour.
This commit is contained in:
@@ -54,9 +54,10 @@ $fs = extrusion_width / 2;
|
|||||||
function round_to_layer(z) = ceil(z / layer_height) * layer_height;
|
function round_to_layer(z) = ceil(z / layer_height) * layer_height;
|
||||||
// Some additional named colours
|
// Some additional named colours
|
||||||
function grey(n) = [0.01, 0.01, 0.01] * n; //! Generate a shade of grey to pass to color().
|
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];
|
silver = [0.75, 0.75, 0.75];
|
||||||
|
gold = [255, 215, 0] / 255;
|
||||||
|
brass = [255, 220, 100] / 255;
|
||||||
|
copper = [230, 140, 51] / 255;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enums
|
* Enums
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 149 KiB |
@@ -1055,7 +1055,8 @@ module pcb(type) { //! Draw specified PCB
|
|||||||
|
|
||||||
fr4 = pcb_colour(type) != "sienna";
|
fr4 = pcb_colour(type) != "sienna";
|
||||||
plating = 0.15;
|
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)
|
translate_z(-plating)
|
||||||
linear_extrude(fr4 ? t + 2 * plating : plating)
|
linear_extrude(fr4 ? t + 2 * plating : plating)
|
||||||
if(Len(grid)) {
|
if(Len(grid)) {
|
||||||
|
@@ -83,7 +83,7 @@ module veroboard(type) { //! Draw specified veroboard with missing tracks and tr
|
|||||||
hole_d = 1;
|
hole_d = 1;
|
||||||
tw = vero_track_width(type);
|
tw = vero_track_width(type);
|
||||||
colour = vero_fr4(type) ? "green" : "goldenrod";
|
colour = vero_fr4(type) ? "green" : "goldenrod";
|
||||||
tc = vero_fr4(type) ? "silver" : "darkorange";
|
tc = vero_fr4(type) ? "silver" : copper;
|
||||||
no_track = vero_no_track(type);
|
no_track = vero_no_track(type);
|
||||||
|
|
||||||
vitamin(str("veroboard(", type[0], "): Veroboard ", holes, " holes x ", strips, "strips"));
|
vitamin(str("veroboard(", type[0], "): Veroboard ", holes, " holes x ", strips, "strips"));
|
||||||
|
Reference in New Issue
Block a user