1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-24 16:13:07 +02:00

Added platters and extrusion overrides to the example project.

This commit is contained in:
Chris Palmer
2021-09-16 22:11:57 +01:00
parent c9c094248e
commit dc93b8dcdf
17 changed files with 102611 additions and 13102 deletions

View File

@@ -32,12 +32,14 @@ layer_height = is_undef($layer_height) ? 0.25 : $layer_height; // lay
extrusion_width = is_undef($extrusion_width) ? 0.5 : $extrusion_width; // filament width when printing
nozzle = is_undef($nozzle) ? 0.45 : $nozzle; // 3D printer nozzle
cnc_bit_r = is_undef($cnc_bit_r) ? 1.2 : $cnc_bit_r; // minimum tool radius when milling 2D objects
pp1_colour = is_undef($pp1_colour) ? rr_green : $pp1_colour; // printed part colour 1, RepRap logo colour
pp2_colour = is_undef($pp2_colour) ? crimson : $pp2_colour; // printed part colour 2
pp3_colour = is_undef($pp3_colour) ? "SteelBlue" : $pp3_colour; // printed part colour 3
pp4_colour = is_undef($pp4_colour) ? "darkorange" : $pp4_colour;// printed part colour 4
show_rays = is_undef($show_rays) ? false : $show_rays; // show camera sight lines and light direction
show_threads = is_undef($show_threads) ? false : $show_threads; // show screw threads
show_plugs = is_undef($show_plugs) ? false : $show_plugs; // plugs on headers
pp1_colour = is_undef($pp1_colour) ? rr_green : $pp1_colour;// printed part colour 1, RepRap logo colour
pp2_colour = is_undef($pp2_colour) ? crimson : $pp2_colour;// printed part colour 2
pp3_colour = is_undef($pp3_colour) ? "SteelBlue" : $pp3_colour;// printed part colour 3
pp4_colour = is_undef($pp4_colour) ? "darkorange" : $pp4_colour;// printed part colour 4
// Minimum wall is about two filaments wide but we extrude it closer to get better bonding
squeezed_wall = $preview ? 2 * extrusion_width - layer_height * (1 - PI / 4)
@@ -51,10 +53,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().
silver = [0.75, 0.75, 0.75];
gold = [255, 215, 0] / 255;
brass = [255, 220, 100] / 255;
copper = [230, 140, 51] / 255;
silver = [0.75, 0.75, 0.75];
gold = [255, 215, 0] / 255;
brass = [255, 220, 100] / 255;
copper = [230, 140, 51] / 255;
/*
* Enums