mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-03-29 22:50:51 -04:00
Better nut colour fix.
This commit is contained in:
parent
b8cd97ff99
commit
bdbe6c1ed1
@ -26,6 +26,7 @@ include <../core.scad>
|
|||||||
use <washer.scad>
|
use <washer.scad>
|
||||||
use <screw.scad>
|
use <screw.scad>
|
||||||
use <../utils/rounded_cylinder.scad>
|
use <../utils/rounded_cylinder.scad>
|
||||||
|
brass_colour = brass;
|
||||||
|
|
||||||
function nut_size(type) = type[1]; //! Diameter of the corresponding screw
|
function nut_size(type) = type[1]; //! Diameter of the corresponding screw
|
||||||
function nut_radius(type) = type[2] / 2; //! Radius across the corners
|
function nut_radius(type) = type[2] / 2; //! Radius across the corners
|
||||||
@ -47,7 +48,7 @@ module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specifi
|
|||||||
if(exploded() && nyloc)
|
if(exploded() && nyloc)
|
||||||
cylinder(r = 0.2, h = 10);
|
cylinder(r = 0.2, h = 10);
|
||||||
|
|
||||||
color(brass ? "gold" : nylon ? grey30: grey70) translate_z((exploded() && nyloc) ? 10 : 0) {
|
color(brass ? brass_colour : nylon ? grey30: grey70) translate_z((exploded() && nyloc) ? 10 : 0) {
|
||||||
linear_extrude(height = thickness)
|
linear_extrude(height = thickness)
|
||||||
difference() {
|
difference() {
|
||||||
circle(outer_rad, $fn = 6);
|
circle(outer_rad, $fn = 6);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user