diff --git a/tests/nuts.scad b/tests/nuts.scad index 9659629..ac4ee29 100644 --- a/tests/nuts.scad +++ b/tests/nuts.scad @@ -85,6 +85,13 @@ module nuts() { if(n == M8_nut) nut_square(M8nS_thin_nut); } + + translate([0,150]){ + if(n==M4_nut) + weld_nut(M4_weld_nut); + if(n==M6_nut) + weld_nut(M6_weld_nut); + } } } diff --git a/tests/rod_ends.scad b/tests/rod_ends.scad new file mode 100644 index 0000000..c4951ff --- /dev/null +++ b/tests/rod_ends.scad @@ -0,0 +1,17 @@ + +include <../utils/core/core.scad> +use <../utils/layout.scad> + +include <../vitamins/rod_ends.scad> + + +module do_rod_ends(list) { + diameters = [for(b = list) rod_end_bearing_od(b)]; + max = max(diameters); + layout(diameters) let(b = list[$i]) + //translate([0, (max - bb_diameter(b)) / 2]) + rod_end_bearing(list[$i]); +} + +if($preview) + do_rod_ends(rod_ends); diff --git a/vitamins/ball_bearings.scad b/vitamins/ball_bearings.scad index 05a095c..1f86594 100644 --- a/vitamins/ball_bearings.scad +++ b/vitamins/ball_bearings.scad @@ -37,6 +37,6 @@ BBF693 = ["F693", 3, 8, 3, "silver", 0.5, 0.7, 9.5, 0.7]; BBF625 = ["F625", 5, 16, 5, "silver", 1.0, 1.0, 18, 1]; BBF695 = ["F695", 5, 13, 4, "silver", 1.0, 1.0, 15, 1]; -ball_bearings = [BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR93, BBSMR95, BB624, BB686, BB696, BB608, BB6200, BB6201, BB6808]; +ball_bearings = [BBF625, BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR85, BBMR93, BBMR95, BBSMR95, BB624, BB686, BB696, BB608, BB6200, BB6201, BB6808]; use diff --git a/vitamins/nut.scad b/vitamins/nut.scad index dcba1ea..152eff4 100644 --- a/vitamins/nut.scad +++ b/vitamins/nut.scad @@ -190,7 +190,7 @@ module wingnut(type) { //! Draw a wingnut function t_nut_tab(type) = [type[8], type[9]]; //! Sliding t-nut T dimensions -module sliding_ball_t_nut(size, w, h, r) { +module sliding_ball_t_nut(size, w, h, r) { //! Draw a sliding ball t nut rad = 0.5; stem = size.z - h; ball_d = 4; @@ -245,7 +245,7 @@ module sliding_t_nut(type) { //! Draw a sliding T nut, T nut with a spring loade extrusionSlidingNut(size, tab[0], tab[1], tabSizeZ, holeRadius, 0, hammerNut); } -module weld_nut(type) { +module weld_nut(type) { //! draw a weld nut thread_d = nut_size(type); hole_rad = thread_d / 2; nut_neck_rad = nut_radius(type); diff --git a/vitamins/rod_end.scad b/vitamins/rod_end.scad index 9c4cfae..394589b 100644 --- a/vitamins/rod_end.scad +++ b/vitamins/rod_end.scad @@ -2,25 +2,25 @@ include include -function rod_end_bearing_bore(type) =type[1]; // radius of the bore hole in the bearing -function rod_end_bearing_od(type) =type[2]; // Outer diameter of the bearing +function rod_end_bearing_bore(type) =type[1]; //! radius of the bore hole in the bearing +function rod_end_bearing_od(type) =type[2]; //! Outer diameter of the bearing function rod_end_bore_width(type) = type[3]; //! Width function rod_end_bearing_width(type) = type[4]; //! Width function rod_end_bearing_shield_colour(type) = type[5]; //! Shield colour, "silver" for metal -function rod_end_screw_radius(type) =type[6]/2; // radius of the screw end, not the bore -// function screw_pitch(type) =type[6]; // pitch of the screw end, not the bore -function rod_end_sphere_seg_width(type) = type[7]; // the width of the pivoting part, effectively a (sphere - sphereCaps - center bore) -function rod_end_sphere_radius(type) = type[8]; -function rod_end_screw_length(type) =type[9]; // length of the screw from eye center, not the bore -function rod_end_thread_length(type) =type[10]; // length of the threads -function rod_end_overall_length(type) = type[11]; +function rod_end_screw_radius(type) =type[6]/2; //! radius of the screw end, not the bore +// function screw_pitch(type) =type[6]; //! pitch of the screw end, not the bore +function rod_end_sphere_seg_width(type) = type[7]; //! the width of the pivoting part, effectively a (sphere - sphereCaps - center bore) +function rod_end_sphere_radius(type) = type[8]; //!radius of the rod end sphere +function rod_end_screw_length(type) =type[9]; //! length of the screw from eye center, not the bore +function rod_end_thread_length(type) =type[10]; //! length of the threads +function rod_end_overall_length(type) = type[11]; //! overall length of the rod end function rod_end_bearing_rim(type) = type[12]; //! Outer rim thickness guesstimate // function screw_thread_radius(type) = //! Thread radius // let(d = screw_thread_diameter(type)) is_undef(d) ? rod_end_screw_radius(type) : d / 2; -module rod_end_bearing(type) { +module rod_end_bearing(type) { //! Draw a rod end bearing bb_bore = rod_end_bearing_bore(type); bb_od=rod_end_bearing_od(type); diff --git a/vitamins/screw.scad b/vitamins/screw.scad index 65d4aa2..c8d2411 100644 --- a/vitamins/screw.scad +++ b/vitamins/screw.scad @@ -237,8 +237,9 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc } if(head_type == hs_dome) { edge_height = head_rad / 7.5; - head_chamfer_x=edge_height/2; - head_fillet_radius= 0.5; + head_chamfer_angle= 15; // degrees + head_chamfer_x=edge_height*tan(head_chamfer_angle); + head_fillet_radius= 0.3; p0 = [head_rad, edge_height]; // Lowest point on the arc p1 = [1.3 * socket_rad / cos(30), head_height]; // Highest point on the arc p = (p0 + p1) / 2; // Start of bisector @@ -252,8 +253,7 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc translate([0, c]) circle(r); - // square([head_rad, head_height]); - offset(head_fillet_radius) offset(-head_fillet_radius) + // offset(head_fillet_radius) offset(-head_fillet_radius) polygon(points = [ [0,0], [head_rad-head_chamfer_x,0],