diff --git a/tests/png/toggles.png b/tests/png/toggles.png index 84f0b18..48d20a0 100644 Binary files a/tests/png/toggles.png and b/tests/png/toggles.png differ diff --git a/vitamins/nut.scad b/vitamins/nut.scad index 43b714e..468a9ef 100644 --- a/vitamins/nut.scad +++ b/vitamins/nut.scad @@ -36,6 +36,7 @@ function nut_radius(type) = type[2] / 2; //! Radius across the corners function nut_thickness(type, nyloc = false) = nyloc ? type[4] : type[3]; //! Thickness of plain or nyloc version function nut_washer(type) = type[5]; //! Corresponding washer function nut_trap_depth(type) = type[6]; //! Depth of nut trap +function nut_pitch(type) = type[7]; //! Pitch if not standard metric course thread function nut_flat_radius(type) = nut_radius(type) * cos(30); //! Radius across the flats @@ -45,6 +46,7 @@ function nut_square_thickness(type) = type[3]; //! Thickness of the square nut module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specified nut thread_d = nut_size(type); + thread_p = nut_pitch(type) ? nut_pitch(type) : metric_coarse_pitch(thread_d); hole_rad = thread_d / 2; outer_rad = nut_radius(type); thickness = nut_thickness(type); @@ -69,7 +71,7 @@ module nut(type, nyloc = false, brass = false, nylon = false) { //! Draw specifi } if(show_threads) - female_metric_thread(thread_d, metric_coarse_pitch(thread_d), thickness, center = false, colour = colour); + female_metric_thread(thread_d, thread_p, thickness, center = false, colour = colour); if(nyloc) translate_z(thickness) diff --git a/vitamins/nuts.scad b/vitamins/nuts.scad index 510c16c..21f6d97 100644 --- a/vitamins/nuts.scad +++ b/vitamins/nuts.scad @@ -28,28 +28,34 @@ M5_nut_depth = 4; M6_nut_depth = 5; M8_nut_depth = 6.5; -// s r t n w t -// c a h y a r -// r d i l s a -// e i c o h p -// w u k c e +// s r t n w t t +// c a h y a r h +// r d i l s a r +// e i c o h p e +// w u k c e d // s n r d -// e t e -// s h p -// s k t -// h -// -M2_nut = ["M2_nut", 2, 4.9, 1.6, 2.4, M2_washer, M2_nut_trap_depth]; -M2p5_nut = ["M2p5_nut", 2.5, 5.8, 2.2, 3.8, M2p5_washer, M2p5_nut_trap_depth]; -M3_nut = ["M3_nut", 3, 6.4, 2.4, 4, M3_washer, M3_nut_trap_depth]; -M4_nut = ["M4_nut", 4, 8.1, 3.2, 5, M4_washer, M4_nut_trap_depth]; -M5_nut = ["M5_nut", 5, 9.2, 4, 6.25, M5_washer, M5_nut_depth]; -M6_nut = ["M6_nut", 6, 11.5, 5, 8, M6_washer, M6_nut_depth]; -M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3]; -M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth]; -toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5]; +// e t e p +// s h p i +// s k t t +// h c +// h +M2_nut = ["M2_nut", 2, 4.9, 1.6, 2.4, M2_washer, M2_nut_trap_depth, 0]; +M2p5_nut = ["M2p5_nut", 2.5, 5.8, 2.2, 3.8, M2p5_washer, M2p5_nut_trap_depth, 0]; +M3_nut = ["M3_nut", 3, 6.4, 2.4, 4, M3_washer, M3_nut_trap_depth, 0]; +M4_nut = ["M4_nut", 4, 8.1, 3.2, 5, M4_washer, M4_nut_trap_depth, 0]; +M5_nut = ["M5_nut", 5, 9.2, 4, 6.25, M5_washer, M5_nut_depth, 0]; +M6_nut = ["M6_nut", 6, 11.5, 5, 8, M6_washer, M6_nut_depth, 0]; +M6_half_nut = ["M6_half_nut", 6, 11.5, 3, 8, M6_washer, 3, 0]; +M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_nut_depth, 0]; +toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5, inch(1/40)]; M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3]; +// sx ty1 ty2 hammer +M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false]; +M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, false, 0, 11, 10, 6, false]; +M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, false, 0, 11, 10, 7, false]; +M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true]; +M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true]; // DIN 562 (thin) square nuts // s w h @@ -65,13 +71,6 @@ M5nS_thin_nut = ["M5nS_thin_nut", 5, 8, 2.7]; M6nS_thin_nut = ["M6nS_thin_nut", 6, 10, 3.2]; M8nS_thin_nut = ["M8nS_thin_nut", 8, 13, 4]; -// sx ty1 ty2 hammer -M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false]; -M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, false, 0, 11, 10, 6, false]; -M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, false, 0, 11, 10, 7, false]; -M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true]; -M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true]; - nuts = [M2_nut, M2p5_nut, M3_nut, M4_nut, M5_nut, M6_nut, M8_nut]; use