From b6a32b6b410038bbb172ef48a97c05e128919fbb Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Sun, 15 Mar 2020 17:16:28 +0000 Subject: [PATCH] Fixed square nut threads. --- vitamins/nut.scad | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vitamins/nut.scad b/vitamins/nut.scad index 752ee1d..43b714e 100644 --- a/vitamins/nut.scad +++ b/vitamins/nut.scad @@ -201,21 +201,21 @@ module nut_square(type, brass = false, nylon = false) { //! Draw specified squar desc = brass ? "brass" : nylon ? "nylon" : ""; vitamin(str("nut(", type[0], arg(brass, false, "brass"), arg(nylon, false, "nylon"), "): Nut M", nut_size(type), "nS ", width, " x ", thickness, "mm ", desc)); - + colour = brass ? brass_colour : nylon ? grey30 : grey70; color(colour) - difference() { - linear_extrude(height = thickness) { - difference() { - square([width, width], center = true); + difference() { + linear_extrude(height = thickness) { + difference() { + square([width, width], center = true); - circle(hole_rad); + circle(hole_rad); + } } - } - if(show_threads) - female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour); - } + } + if(show_threads) + female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour); } function nut_trap_radius(nut, horizontal = false) = nut_radius(nut) + (horizontal ? layer_height / 4 : 0); //! Radius across the corners of a nut trap