diff --git a/vitamins/nut.scad b/vitamins/nut.scad index 40611fa..e78f74e 100644 --- a/vitamins/nut.scad +++ b/vitamins/nut.scad @@ -134,10 +134,10 @@ module wingnut(type) { //! Draw a wingnut module sliding_t_nut(type) { vitamin(str("sliding_t_nut(", type[0], "): Nut M", nut_size(type), " sliding T")); - size = [type[7], type[2], nut_thickness(type)]; + size = [type[7], type[2], nut_thickness(type, true)]; tabSizeY1 = type[8]; tabSizeY2 = type[9]; - tabSizeZ = type[10]; + tabSizeZ = nut_thickness(type); holeRadius = nut_size(type) / 2; color(grey80) @@ -147,10 +147,10 @@ module sliding_t_nut(type) { module hammer_nut(type) { vitamin(str("hammer_nut(", type[0], "): Nut M", nut_size(type), " hammer")); - size = [type[7], type[2], nut_thickness(type)]; + size = [type[7], type[2], nut_thickness(type, true)]; tabSizeY1 = type[8]; tabSizeY2 = type[9]; - tabSizeZ = type[10]; + tabSizeZ = nut_thickness(type); holeRadius = nut_size(type) / 2; color(grey80) @@ -159,9 +159,9 @@ module hammer_nut(type) { module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) { // center section - h = size.z - tabSizeZ; - translate_z(-h) - linear_extrude(h) + stem_h = size.z - tabSizeZ; + translate_z(-stem_h) + linear_extrude(stem_h) difference() { square([size.x, size.y], center = true); if(hammerNut) { @@ -185,15 +185,15 @@ module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, hol thread_d = 2 * holeRadius; if(show_threads) - translate([holeOffset, 0, -h]) + translate([holeOffset, 0, -stem_h]) female_metric_thread(thread_d, metric_coarse_pitch(thread_d), size.z, center = false); // add the side tabs for(m = [0, 1]) mirror([0, m, 0]) - translate([0, tabSizeY2 / 2, 0]) { + translate([0, tabSizeY2 / 2]) { cubeZ = 1; - translate([-size.x / 2, 0, 0]) + translate([-size.x / 2, 0]) cube([size.x, (tabSizeY1 - tabSizeY2) / 2, cubeZ]); translate_z(cubeZ) rotate([0, -90, 0]) diff --git a/vitamins/nuts.scad b/vitamins/nuts.scad index 018c065..f9210aa 100644 --- a/vitamins/nuts.scad +++ b/vitamins/nuts.scad @@ -51,12 +51,12 @@ toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5] M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3]; -// sx ty1 ty2 tz -M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 4.0, 0, M3_washer, 0, 10, 10, 6, 3]; -M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 4.5, 0, M4_washer, 0, 11, 10, 6, 3.25]; -M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 4.5, 0, M5_washer, 0, 11, 10, 7, 3.25]; -M3_hammer_nut = ["M3_hammer_nut", 3, 6, 4.0, 0, M3_washer, 0, 5.5, 10, 6, 2.75]; -M4_hammer_nut = ["M4_hammer_nut", 4, 6, 4.5, 0, M4_washer, 0, 5.5, 10, 6, 3.25]; +// sx ty1 ty2 +M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, M3_washer, 0, 10, 10, 6]; +M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, M4_washer, 0, 11, 10, 6]; +M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, M5_washer, 0, 11, 10, 7]; +M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, M3_washer, 0, 5.5, 10, 6]; +M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, M4_washer, 0, 5.5, 10, 6]; nuts = [M2_nut, M2p5_nut, M3_nut, M4_nut, M5_nut, M6_nut, M8_nut];