diff --git a/lib.scad b/lib.scad index e10e864..fc28023 100644 --- a/lib.scad +++ b/lib.scad @@ -58,6 +58,7 @@ include include include include +include include include include diff --git a/libtest.png b/libtest.png index b3938e9..afd2926 100644 Binary files a/libtest.png and b/libtest.png differ diff --git a/libtest.scad b/libtest.scad index d767202..b1990a4 100644 --- a/libtest.scad +++ b/libtest.scad @@ -98,6 +98,7 @@ use use use use +use use use use @@ -178,7 +179,7 @@ translate([x5, screw_knobs_y]) screw_knobs(); knobs_y = screw_knobs_y + 40; -translate([640, knobs_y]) +translate([660, knobs_y]) printed_pulley_test(); translate([x5, knobs_y]) @@ -223,7 +224,7 @@ translate([950, box_y]) inserts_y = 0; nuts_y = inserts_y + 20; -washers_y = nuts_y + 140; +washers_y = nuts_y + 160; screws_y = washers_y + 120; threaded_inserts_y = screws_y + 180; circlips_y = threaded_inserts_y + 30; @@ -293,6 +294,9 @@ translate([x0, pulleys_y]) translate([x0, leadnuts_y]) leadnuts(); +translate([x0 + 170, leadnuts_y]) + rod_ends(); + translate([x0 + 120, leadnuts_y]) leadnuthousings(); @@ -306,7 +310,7 @@ translate([x0, linear_bearings_y]) { translate([x0, steppers_y]) stepper_motors(); -translate([x0 + 400, steppers_y]) +translate([x0 + 450, steppers_y]) gear_motors(); translate([x0, sheets_y]) @@ -410,7 +414,7 @@ blowers_y = ssrs_y + 60; hot_ends_y = blowers_y + 100; batteries_y = hot_ends_y + 55; panel_meters_y = batteries_y + 70; -extrusions_y = panel_meters_y + 100; +extrusions_y = panel_meters_y + 130; translate([x3, veroboard_y]) veroboard_test(); diff --git a/readme.md b/readme.md index bdc8533..ffa54ed 100644 --- a/readme.md +++ b/readme.md @@ -26,30 +26,31 @@ A list of changes classified as breaking, additions or fixes is maintained in [C Axials Jack Ring_terminals Cable_clip Catenary Global BLDC_motors LDRs Rockers Cable_grommets Core_xy Polyholes Ball_bearings LED_meters Rod Camera_housing Dogbones Rounded_rectangle - Batteries LEDs SBR_rails Carriers Fillet Sphere - Bearing_blocks Leadnuts SK_brackets Corner_block Gears Teardrops - Belts Light_strips SMDs Door_hinge Hanging_hole - Blowers Linear_bearings SSRs Door_latch Horiholes - Box_sections Magnets Screws Drag_chain Layout - Bulldogs Mains_sockets Sealing_strip Fan_guard Maths - Buttons Microswitches Servo_motors Fixing_block Offset - Cable_strips Microview Shaft_couplings Flat_hinge PCB_utils - Cameras Modules Sheets Foot Quadrant - Circlips Nuts Spades Handle Round - Components O_ring Spools Knob Rounded_cylinder - DIP Opengrab Springs LED_bezel Rounded_polygon - D_connectors PCB Stepper_motors PCB_mount Rounded_triangle - Displays PCBs Swiss_clips PSU_shroud Sector - Extrusion_brackets PSUs Terminals Pocket_handle Splines - Extrusions Panel_meters Toggles Press_fit Sweep - Fans Photo_interrupters Transformers Printed_box Thread - Fastons Pillars Ttracks Printed_pulleys Tube - Fuseholder Pillow_blocks Tubings Ribbon_clamp - Gear_motors Pin_headers Variacs SSR_shroud - Geared_steppers Potentiometers Veroboard Screw_knob - Green_terminals Pulleys Washers Socket_box - Hot_ends Wire Strap_handle - Hygrometer Zipties + Batteries LEDs Rod_ends Carriers Fillet Sphere + Bearing_blocks Leadnuts SBR_rails Corner_block Gears Teardrops + Belts Light_strips SK_brackets Door_hinge Hanging_hole + Blowers Linear_bearings SMDs Door_latch Horiholes + Box_sections Magnets SSRs Drag_chain Layout + Bulldogs Mains_sockets Screws Fan_guard Maths + Buttons Microswitches Sealing_strip Fixing_block Offset + Cable_strips Microview Servo_motors Flat_hinge PCB_utils + Cameras Modules Shaft_couplings Foot Quadrant + Circlips Nuts Sheets Handle Round + Components O_ring Spades Knob Rounded_cylinder + DIP Opengrab Spools LED_bezel Rounded_polygon + D_connectors PCB Springs PCB_mount Rounded_triangle + Displays PCBs Stepper_motors PSU_shroud Sector + Extrusion_brackets PSUs Swiss_clips Pocket_handle Splines + Extrusions Panel_meters Terminals Press_fit Sweep + Fans Photo_interrupters Toggles Printed_box Thread + Fastons Pillars Transformers Printed_pulleys Tube + Fuseholder Pillow_blocks Ttracks Ribbon_clamp + Gear_motors Pin_headers Tubings SSR_shroud + Geared_steppers Potentiometers Variacs Screw_knob + Green_terminals Pulleys Veroboard Socket_box + Hot_ends Washers Strap_handle + Hygrometer Wire + Zipties --- @@ -233,13 +234,16 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry. | 1 | `ball_bearing(BB686)` | Ball bearing 686ZZ 6mm x 13mm x 5mm | | 1 | `ball_bearing(BB696)` | Ball bearing 696ZZ 6mm x 16mm x 5mm | | 1 | `ball_bearing(BBF623)` | Ball bearing F623-2RS 3mm x 10mm x 4mm | +| 1 | `ball_bearing(BBF625)` | Ball bearing F625ZZ 5mm x 16mm x 5mm | | 1 | `ball_bearing(BBF693)` | Ball bearing F693ZZ 3mm x 8mm x 3mm | | 1 | `ball_bearing(BBF695)` | Ball bearing F695ZZ 5mm x 13mm x 4mm | | 1 | `ball_bearing(BBMR63)` | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm | | 1 | `ball_bearing(BBMR83)` | Ball bearing MR83ZZ 3mm x 8mm x 3mm | +| 1 | `ball_bearing(BBMR85)` | Ball bearing MR85ZZ 5mm x 8mm x 2.5mm | | 1 | `ball_bearing(BBMR93)` | Ball bearing MR93ZZ 3mm x 9mm x 4mm | +| 1 | `ball_bearing(BBMR95)` | Ball bearing MR95ZZ 5mm x 9mm x 3mm | | 1 | `ball_bearing(BBSMR95)` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm | -| 7 | ` bearing_ball(3)` | Steel ball 3mm | +| 8 | ` bearing_ball(3)` | Steel ball 3mm | Top @@ -2374,6 +2378,8 @@ If a nut is given a child then it gets placed on its top surface. | `nut_square_width(type)` | Width of the square nut | | `nut_trap_depth(type)` | Depth of nut trap | | `nut_washer(type)` | Corresponding washer | +| `nut_weld_base_r(type)` | Weld nut base radius | +| `nut_weld_base_t(type)` | Weld nut base thickness | ### Functions | Function | Description | @@ -2393,7 +2399,9 @@ If a nut is given a child then it gets placed on its top surface. | `nut_and_washer(type, nyloc)` | Draw nut with corresponding washer | | `nut_square(type, brass = false, nylon = false)` | Draw specified square nut | | `nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200)` | Make a nut trap | +| `sliding_ball_t_nut(size, w, h, r)` | Draw a sliding ball t nut | | `sliding_t_nut(type)` | Draw a sliding T nut, T nut with a spring loaded ball or a hammer nut. | +| `weld_nut(type)` | draw a weld nut | | `wingnut(type)` | Draw a wingnut | ![nuts](tests/png/nuts.png) @@ -2436,6 +2444,8 @@ If a nut is given a child then it gets placed on its top surface. | 1 | `nut(M8_nut, nyloc = true)` | Nut M8 x 6.5mm nyloc | | 1 | `nut(M8nS_thin_nut)` | Nut M8nS 13 x 4mm | | 1 | `washer(M6_washer)` | Washer M6 x 12.5mm x 1.5mm | +| 1 | `weld nut(M4_weld_nut)` | Weld Nut M4 | +| 1 | `weld nut(M6_weld_nut)` | Weld Nut M6 | | 1 | `wingnut(M4_wingnut)` | Wingnut M4 | @@ -3372,9 +3382,14 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers. ### Vitamins | Qty | Module call | BOM entry | | ---:|:--- |:---| +| 1 | `pulley(GT2x16_pulley_9)` | Pulley GT2 16 teeth | | 1 | `pulley(GT2x16_pulley)` | Pulley GT2 16 teeth | +| 1 | `pulley(GT2x20_pulley_9)` | Pulley GT2 20 teeth | +| 1 | `pulley(GT2x80_pulley)` | Pulley GT2 80 teeth | | 1 | `pulley(GT2x16_toothed_idler)` | Pulley GT2 idler 16 teeth | +| 1 | `pulley(GT2x16_toothed_idler_9)` | Pulley GT2 idler 16 teeth | | 1 | `pulley(GT2x20_toothed_idler)` | Pulley GT2 idler 20 teeth | +| 1 | `pulley(GT2x20_toothed_idler_9)` | Pulley GT2 idler 20 teeth | | 1 | `pulley(GT2x20_plain_idler)` | Pulley GT2 idler smooth 12mm | | 1 | `pulley(GT2x16_plain_idler)` | Pulley GT2 idler smooth 9.63mm | | 1 | `pulley(GT2x16x7_plain_idler)` | Pulley GT2 idler smooth 9.63mm | @@ -3386,8 +3401,9 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers. | 1 | `screw(M3_grub_screw, 3)` | Screw M3 grub x 3mm | | 2 | `screw(M3_grub_screw, 4.5)` | Screw M3 grub x 4.5mm | | 2 | `screw(M3_grub_screw, 4)` | Screw M3 grub x 4mm | -| 4 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm | -| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm | +| 6 | `screw(M3_grub_screw, 6)` | Screw M3 grub x 6mm | +| 3 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm | +| 2 | `screw(M5_grub_screw, 6)` | Screw M5 grub x 6mm | Top @@ -3723,6 +3739,48 @@ These items are symmetrical, so by default the origin is in the centre but it ca | 1 | `studding(8, 80)` | Threaded rod M8 x 80mm | +Top + +--- + +## Rod_ends +A rod end, sometimes called a spherical bearing or rod-end eye, is a component used in mechanical systems to create a flexible connection between two parts. + +[vitamins/rod_ends.scad](vitamins/rod_ends.scad) Object definitions. + +[vitamins/rod_end.scad](vitamins/rod_end.scad) Implementation. + +[tests/rod_ends.scad](tests/rod_ends.scad) Code for this example. + +### Properties +| Function | Description | +|:--- |:--- | +| `rod_end_bearing_bore(type)` | radius of the bore hole in the bearing | +| `rod_end_bearing_od(type)` | Outer diameter of the bearing | +| `rod_end_bearing_rim(type)` | Outer rim thickness guesstimate | +| `rod_end_bearing_shield_colour(type)` | Shield colour, "silver" for metal | +| `rod_end_bearing_width(type)` | Width | +| `rod_end_bore_width(type)` | Width | +| `rod_end_overall_length(type)` | overall length of the rod end | +| `rod_end_screw_length(type)` | length of the screw from eye center, not the bore | +| `rod_end_screw_radius(type)` | radius of the screw end, not the bore | +| `rod_end_sphere_radius(type)` | radius of the rod end sphere | +| `rod_end_sphere_seg_width(type)` | the width of the pivoting part, effectively a (sphere - sphereCaps - center bore) | +| `rod_end_thread_length(type)` | length of the threads | + +### Modules +| Module | Description | +|:--- |:--- | +| `rod_end_bearing(type)` | Draw a rod end bearing | + +![rod_ends](tests/png/rod_ends.png) + +### Vitamins +| Qty | Module call | BOM entry | +| ---:|:--- |:---| +| 1 | `Rod End Bearing(RE_m5_bearing, 33)` | Rod End Bearing 5 x 33mm | + + Top --- @@ -3856,11 +3914,13 @@ For an explanation of `screw_polysink()` see Top @@ -4504,18 +4565,19 @@ NEMA stepper motor model. | Qty | Module call | BOM entry | | ---:|:--- |:---| | 4 | `ring_terminal(M3_ringterm)` | Ring terminal 3mm | -| 20 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | -| 1 | `NEMA(NEMA14_36)` | Stepper motor NEMA14 x 36mm | -| 1 | `NEMA(NEMA16_19)` | Stepper motor NEMA16 x 19.2mm | -| 1 | `NEMA(NEMA17_27)` | Stepper motor NEMA17 x 26.5mm | -| 1 | `NEMA(NEMA17_34)` | Stepper motor NEMA17 x 34mm | -| 1 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm | -| 1 | `NEMA(NEMA17_47)` | Stepper motor NEMA17 x 47mm | -| 1 | `NEMA(NEMA23_51)` | Stepper motor NEMA22 x 51.2mm | -| 1 | `NEMA(NEMA8_30)` | Stepper motor NEMA8 x 30mm | -| 1 | `NEMA(NEMA8_30BH)` | Stepper motor NEMA8 x 30mm | -| 16 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | -| 20 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | +| 25 | `screw(M3_pan_screw, 8)` | Screw M3 pan x 8mm | +| 1 | `NEMA(NEMA14_36)` | Stepper motor NEMA14 x 36mm (5x21 shaft) | +| 1 | `NEMA(NEMA16_19)` | Stepper motor NEMA16 x 19.2mm (5x12 shaft) | +| 1 | `NEMA(NEMA17_27)` | Stepper motor NEMA17 x 26.5mm (5x26.5 shaft) | +| 1 | `NEMA(NEMA17_34)` | Stepper motor NEMA17 x 34mm (5x24 shaft) | +| 1 | `NEMA(NEMA17_40)` | Stepper motor NEMA17 x 40mm (5x20 shaft) | +| 1 | `NEMA(NEMA17_47)` | Stepper motor NEMA17 x 47mm (5x24 shaft) | +| 1 | `NEMA(NEMA17_47L80)` | Stepper motor NEMA17 x 47mm (5x80 shaft) | +| 1 | `NEMA(NEMA23_51)` | Stepper motor NEMA22 x 51.2mm (6.35x24 shaft) | +| 1 | `NEMA(NEMA8_30)` | Stepper motor NEMA8 x 30mm (4x6 shaft) | +| 1 | `NEMA(NEMA8_30BH)` | Stepper motor NEMA8 x 30mm (5x12 shaft) | +| 21 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | +| 25 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm | Top @@ -6512,8 +6574,9 @@ Creative Commons - Attribution - Share Alike license (see Top diff --git a/tests/nuts.scad b/tests/nuts.scad index ac4ee29..e1efe14 100644 --- a/tests/nuts.scad +++ b/tests/nuts.scad @@ -86,12 +86,12 @@ module nuts() { nut_square(M8nS_thin_nut); } - translate([0,150]){ + translate([0,140]) { if(n==M4_nut) weld_nut(M4_weld_nut); if(n==M6_nut) weld_nut(M6_weld_nut); - } + } } } diff --git a/tests/png/ball_bearings.png b/tests/png/ball_bearings.png index 8f38e65..3f646bc 100644 Binary files a/tests/png/ball_bearings.png and b/tests/png/ball_bearings.png differ diff --git a/tests/png/box.png b/tests/png/box.png index 3e8c9f3..eae60cc 100644 Binary files a/tests/png/box.png and b/tests/png/box.png differ diff --git a/tests/png/butt_box.png b/tests/png/butt_box.png index 5e4b844..c2ae6e7 100644 Binary files a/tests/png/butt_box.png and b/tests/png/butt_box.png differ diff --git a/tests/png/cable_clip.png b/tests/png/cable_clip.png index b4ac20c..2e2ca71 100644 Binary files a/tests/png/cable_clip.png and b/tests/png/cable_clip.png differ diff --git a/tests/png/camera_housing.png b/tests/png/camera_housing.png index c40e61b..760d61a 100644 Binary files a/tests/png/camera_housing.png and b/tests/png/camera_housing.png differ diff --git a/tests/png/corner_block.png b/tests/png/corner_block.png index eca62dd..fe05684 100644 Binary files a/tests/png/corner_block.png and b/tests/png/corner_block.png differ diff --git a/tests/png/door_hinge.png b/tests/png/door_hinge.png index 41e6845..051b8d5 100644 Binary files a/tests/png/door_hinge.png and b/tests/png/door_hinge.png differ diff --git a/tests/png/fans.png b/tests/png/fans.png index ad1ceea..d9f27c9 100644 Binary files a/tests/png/fans.png and b/tests/png/fans.png differ diff --git a/tests/png/fixing_block.png b/tests/png/fixing_block.png index ca81ea9..384d6db 100644 Binary files a/tests/png/fixing_block.png and b/tests/png/fixing_block.png differ diff --git a/tests/png/flat_hinge.png b/tests/png/flat_hinge.png index bd9a01e..c8b46bc 100644 Binary files a/tests/png/flat_hinge.png and b/tests/png/flat_hinge.png differ diff --git a/tests/png/modules.png b/tests/png/modules.png index e0e47e0..889d866 100644 Binary files a/tests/png/modules.png and b/tests/png/modules.png differ diff --git a/tests/png/nuts.png b/tests/png/nuts.png index 85d6ac6..c20c51d 100644 Binary files a/tests/png/nuts.png and b/tests/png/nuts.png differ diff --git a/tests/png/pcbs.png b/tests/png/pcbs.png index 2024815..5817945 100644 Binary files a/tests/png/pcbs.png and b/tests/png/pcbs.png differ diff --git a/tests/png/printed_pulleys.png b/tests/png/printed_pulleys.png index 91f5db8..92e18e5 100644 Binary files a/tests/png/printed_pulleys.png and b/tests/png/printed_pulleys.png differ diff --git a/tests/png/pulleys.png b/tests/png/pulleys.png index 1417e4a..92eb595 100644 Binary files a/tests/png/pulleys.png and b/tests/png/pulleys.png differ diff --git a/tests/png/ribbon_clamp.png b/tests/png/ribbon_clamp.png index 21c17bb..834274f 100644 Binary files a/tests/png/ribbon_clamp.png and b/tests/png/ribbon_clamp.png differ diff --git a/tests/png/ring_terminals.png b/tests/png/ring_terminals.png index f680c47..96a2360 100644 Binary files a/tests/png/ring_terminals.png and b/tests/png/ring_terminals.png differ diff --git a/tests/png/rod_ends.png b/tests/png/rod_ends.png new file mode 100644 index 0000000..3f1a1ac Binary files /dev/null and b/tests/png/rod_ends.png differ diff --git a/tests/png/screws.png b/tests/png/screws.png index 64afde1..f4e5824 100644 Binary files a/tests/png/screws.png and b/tests/png/screws.png differ diff --git a/tests/png/socket_box.png b/tests/png/socket_box.png index a05b089..432094c 100644 Binary files a/tests/png/socket_box.png and b/tests/png/socket_box.png differ diff --git a/tests/png/springs.png b/tests/png/springs.png index 266c52a..742a8ce 100644 Binary files a/tests/png/springs.png and b/tests/png/springs.png differ diff --git a/tests/png/stepper_motors.png b/tests/png/stepper_motors.png index 88cc75f..ca324d2 100644 Binary files a/tests/png/stepper_motors.png and b/tests/png/stepper_motors.png differ diff --git a/tests/png/veroboard.png b/tests/png/veroboard.png index c6822db..a31f1e5 100644 Binary files a/tests/png/veroboard.png and b/tests/png/veroboard.png differ diff --git a/tests/printed_pulleys.scad b/tests/printed_pulleys.scad index 44983e0..ce341f1 100644 --- a/tests/printed_pulleys.scad +++ b/tests/printed_pulleys.scad @@ -22,9 +22,16 @@ include <../vitamins/pulleys.scad> include <../printed/printed_pulleys.scad> use <../utils/layout.scad> +n = len(pulleys) - 1; +half = floor((n - 1) / 2); +split = n - half; +pulleys1 = [for(i = [0 : split - 1]) pulleys[i]]; +pulleys2 = [for(i = [split : n - 1]) pulleys[i]]; -module printed_pulley_test(show_metal = false) { - layout([for (p = pulleys) pulley_flange_dia(p)]) let(p = pulleys[$i]) { +max_d = max([for(p = concat(pulleys1, pulleys2)) pulley_flange_dia(p)]); + +module do_list(list, show_metal) { + layout([for (p = list) max_d]) let(p = list[$i]) { rotate(-145) if($preview) printed_pulley_assembly(p); @@ -33,12 +40,23 @@ module printed_pulley_test(show_metal = false) { if(show_metal) not_on_bom() - translate([0, 20]) + translate([0, 60]) rotate(-145) pulley_assembly(p); } } +module printed_pulley_test(show_metal = false) { + translate([0, 10]) + do_list(pulleys1, show_metal); + + translate([0, -10]) + do_list(pulleys2, show_metal); + + translate([split * (max_d + 5), 0]) + do_list([pulleys[n]], show_metal); +} + if($preview) printed_pulley_test(true); else diff --git a/tests/rod_ends.scad b/tests/rod_ends.scad index c4951ff..481587a 100644 --- a/tests/rod_ends.scad +++ b/tests/rod_ends.scad @@ -1,3 +1,21 @@ +// +// NopSCADlib Copyright Chris Palmer 2024 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// include <../utils/core/core.scad> use <../utils/layout.scad> @@ -5,13 +23,12 @@ use <../utils/layout.scad> include <../vitamins/rod_ends.scad> -module do_rod_ends(list) { +module rod_ends(list = rod_ends) { 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]); + rod_end_bearing(list[$i]); } if($preview) - do_rod_ends(rod_ends); + rod_ends(); diff --git a/vitamins/nut.scad b/vitamins/nut.scad index 152eff4..d6534e4 100644 --- a/vitamins/nut.scad +++ b/vitamins/nut.scad @@ -41,9 +41,12 @@ function nut_dome(type) = type[8]; //! Dome height and max thread d function nut_flat_radius(type) = nut_radius(type) * cos(30); //! Radius across the flats -function nut_square_size(type) = type[1]; //! Diameter of the corresponding screw -function nut_square_width(type) = type[2]; //! Width of the square nut -function nut_square_thickness(type) = type[3]; //! Thickness of the square nut +function nut_square_size(type) = type[1]; //! Diameter of the corresponding screw +function nut_square_width(type) = type[2]; //! Width of the square nut +function nut_square_thickness(type) = type[3]; //! Thickness of the square nut + +function nut_weld_base_r(type) = type[7] / 2; //! Weld nut base radius +function nut_weld_base_t(type) = type[8]; //! Weld nut base thickness function nut_dome_height(type) = let(d = nut_dome(type)) d ? d[0] : nut_thickness(type); //! Height of the domed version function nut_thread_depth(type) = let(d = nut_dome(type)) d ? d[1] : nut_thickness(type); //! Max thread depth in domed version @@ -190,7 +193,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) { //! Draw a sliding ball t nut +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; @@ -249,14 +252,13 @@ module weld_nut(type) { //! draw a weld nut thread_d = nut_size(type); hole_rad = thread_d / 2; nut_neck_rad = nut_radius(type); - // top_rad = type[4] / 2; thickness = nut_thickness(type); - base_rad = type[7]/2; - base_thickness= type[8]; + base_rad = nut_weld_base_r(type); + base_thickness = nut_weld_base_t(type); vitamin(str("weld nut(", type[0], "): Weld Nut M", nut_size(type))); - colour = silver; + colour = silver; explode(-20) { color(colour) { diff --git a/vitamins/nuts.scad b/vitamins/nuts.scad index b0933d3..4b69c49 100644 --- a/vitamins/nuts.scad +++ b/vitamins/nuts.scad @@ -50,8 +50,10 @@ M8_nut = ["M8_nut", 8, 15, 6.5, 8, M8_washer, M8_n 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]; -M4_weld_nut = ["M4_weld_nut", 4, 5.3, 6.3, 8, M4_washer, 0, 18, 0.8, 6, 3]; -M6_weld_nut = ["M6_weld_nut", 6, 7.7, 7.9, 8, M6_washer, 0, 19.1, 1.2, 6, 3]; + +M4_weld_nut = ["M4_weld_nut", 4, 5.3, 6.3, 8, M4_washer, 0, 18, 0.8,]; // Base diameter and thickness +M6_weld_nut = ["M6_weld_nut", 6, 7.7, 7.9, 8, M6_washer, 0, 19.1, 1.2,]; + // 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.7, 4.7, false, 0, 11, 10, 6, false]; diff --git a/vitamins/pulleys.scad b/vitamins/pulleys.scad index 0f9f6d1..37652b5 100644 --- a/vitamins/pulleys.scad +++ b/vitamins/pulleys.scad @@ -26,7 +26,7 @@ include // e e s // l z // d t -// +// T5x10_pulley = ["T5x10_pulley", "T5", 10, 15, T5x6, 11.6, 7.9, 7, 5, 19.3, 1.7, 3, 10.7, M3_grub_screw, 1]; T2p5x16_pulley = ["T2p5x16_pulley", "T2.5", 16, 12.16, T2p5x6, 8, 16, 5.7, 5, 16.0, 1.0, 6, 3.75, M4_grub_screw, 1]; GT2x20um_pulley = ["GT2x20um_pulley", "GT2UM", 20, 12.22, GT2x6, 7.5, 18, 6.5, 5, 18.0, 1.0, 6, 3.75, M3_grub_screw, 2]; //Ultimaker @@ -39,26 +39,33 @@ GT2x16_toothed_idler = ["GT2x16_toothed_idler", "GT2", 16, 9.75, GT2x6, 6. GT2x16_plain_idler = ["GT2x16_plain_idler", "GT2", 0, 9.63, GT2x6, 6.5, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0]; GT2x16x7_plain_idler = ["GT2x16x7_plain_idler", "GT2", 0, 9.63, GT2x6, 7.0, 13, 0, 3, 13.0, 1.0, 0, 0, false, 0]; -GT2x80_pulley = ["GT2x80_pulley", "GT2", 80, 50.42, GT2x6, 7, 35, 9, 5, 55, 1.0, 6, 4.5, M5_grub_screw, 2]; // Powge branded from West3D +GT2x80_pulley = ["GT2x80_pulley", "GT2", 80, 50.42, GT2x6, 7, 35, 9, 5, 55, 1.0, 6, 4.5, M5_grub_screw, 2]; // Powge branded from West3D GT2x16_toothed_idler_9 = ["GT2x16_toothed_idler_9", "GT2", 16, 9.75, GT2x9, 10, 14, 0, 3, 14.0, 1.0, 0, 0, false, 0];//Robotdigg -GT2x16_pulley_9 = ["GT2x16_pulley_9", "GT2", 16, 9.65, GT2x9, 9.5, 14, 6.5, 5, 14.0, 1.0, 6, 3.5, M3_grub_screw, 2]; -GT2x20_pulley_9 = ["GT2x20_pulley_9", "GT2", 20, 12.22, GT2x9, 11, 16, 7, 5, 16.0, 1.0, 6, 3.25, M4_grub_screw, 2];//Powge +GT2x16_pulley_9 = ["GT2x16_pulley_9", "GT2", 16, 9.65, GT2x9, 9.5, 14, 6.5, 5, 14.0, 1.0, 6, 3.5, M3_grub_screw, 2]; +GT2x20_pulley_9 = ["GT2x20_pulley_9", "GT2", 20, 12.22, GT2x9, 11, 16, 7, 5, 16.0, 1.0, 6, 3.25, M4_grub_screw, 2];//Powge GT2x20_toothed_idler_9 = ["GT2x20_toothed_idler_9", "GT2", 20, 12.22, GT2x9, 10, 18, 0, 5, 18.0, 1.0, 0, 0, false, 0]; -pulleys = [T5x10_pulley, - T2p5x16_pulley, - GT2x20um_pulley, - GT2x20ob_pulley, - GT2x16_pulley, - GT2x12_pulley, - GT2x20_toothed_idler, - GT2x20_plain_idler, - GT2x16_toothed_idler, - GT2x16_plain_idler, - GT2x16x7_plain_idler - - ]; +pulleys = [ + T5x10_pulley, + T2p5x16_pulley, + GT2x20_pulley_9, + GT2x20um_pulley, + GT2x20ob_pulley, + GT2x16_pulley_9, + GT2x16_pulley, + GT2x12_pulley, + + GT2x16_plain_idler, + GT2x16x7_plain_idler, + GT2x20_plain_idler, + GT2x16_toothed_idler, + GT2x16_toothed_idler_9, + GT2x20_toothed_idler, + GT2x20_toothed_idler_9, + + GT2x80_pulley, +]; use diff --git a/vitamins/rod_end.scad b/vitamins/rod_end.scad index 394589b..6ee7550 100644 --- a/vitamins/rod_end.scad +++ b/vitamins/rod_end.scad @@ -1,40 +1,55 @@ +// +// NopSCADlib Copyright Chris Palmer 2024 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// + +// +//! A rod end, sometimes called a spherical bearing or rod-end eye, is a component used in mechanical systems to create a flexible connection between two parts. +// 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_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]; //!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; - +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 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 module rod_end_bearing(type) { //! Draw a rod end bearing - bb_bore = rod_end_bearing_bore(type); - bb_od=rod_end_bearing_od(type); - bb_rim=rod_end_bearing_rim(type); - - bb_width=rod_end_bearing_width(type); + bb_bore = rod_end_bearing_bore(type); + bb_od = rod_end_bearing_od(type); + bb_rim = rod_end_bearing_rim(type); + + bb_width = rod_end_bearing_width(type); bb_shield_colour = rod_end_bearing_shield_colour(type); length = rod_end_screw_length(type); - sphere_rad = rod_end_sphere_radius(type)/2; + sphere_rad = rod_end_sphere_radius(type) / 2; rod_end_sphere_seg_width= rod_end_sphere_seg_width(type); - shaft_rad = rod_end_screw_radius(type) - eps; + shaft_rad = rod_end_screw_radius(type) - eps; thread_rad = rod_end_screw_radius(type); thread = rod_end_thread_length(type); //length - bb_od/2; - // thread = length - bb_od/2; thread_offset = 0; thread_d = 2 * thread_rad; pitch = metric_coarse_pitch(thread_d); @@ -42,77 +57,53 @@ module rod_end_bearing(type) { //! Draw a rod end bearing shield_width=bb_width - (bb_width < 5 ? 0.5 : 1); chamfer = bb_rim / 6; -description = str("Rod End Bearing ", type[1], length < 10 ? " x " : " x ", length, "mm"); - vitamin(str("Rod End Bearing(", type[0], length, "): ", description)); - - // show_threads=true; + description = str("Rod End Bearing ", type[1], length < 10 ? " x " : " x ", length, "mm"); + vitamin(str("Rod End Bearing(", type[0], ", ", length, "): ", description)); module shaft(socket = 0, headless = false) { - // point = screw_nut(type) ? 0 : 3 * shaft_rad; - shank = length; + shank = length; - if(show_threads && pitch) - translate_z(-length - thread_offset) - male_metric_thread(thread_d, pitch, thread, false, top = headless ? -1 : 0, solid = !headless, colour = colour); - else - color(colour * 0.9) - rotate_extrude() { - translate([0, -length - thread_offset]) - square([thread_rad - eps, thread ]); - - // if(point) - // polygon([ - // [0.4, -length], [0, point - length], [shaft_rad, point - length] - // ]); - } - - - // if(shank > 0) - // color(colour) - // translate_z(-shank - socket) - // cylinder(r = shaft_rad + eps, h = shank); + if(show_threads && pitch) + translate_z(-length - thread_offset) + male_metric_thread(thread_d, pitch, thread, false, top = headless ? -1 : 0, solid = !headless, colour = colour); + else + color(colour * 0.9) + rotate_extrude() { + translate([0, -length - thread_offset]) + square([thread_rad - eps, thread ]); + } } - module bearingEye(){ - rotate_extrude() - { - difference() { - circle(r = sphere_rad); - translate(v = [0,-sphere_rad]) - square(size = sphere_rad*2); + module bearingEye() { + color(colour) + rotate_extrude() + difference() { + circle(r = sphere_rad); - for(i=[0,1]) - mirror(v = [0,i]) - translate(v = [-sphere_rad,rod_end_sphere_seg_width/2]) - square(size = sphere_rad*2); + translate(v = [0, -sphere_rad]) + square(size = sphere_rad * 2); - square([bb_bore,rod_end_sphere_seg_width+1], center=true); - } - } + for(i=[0, 1]) + mirror(v = [0, i]) + translate(v = [-sphere_rad,rod_end_sphere_seg_width / 2]) + square(size = sphere_rad * 2); + + square([bb_bore, rod_end_sphere_seg_width + 1], center = true); + } color(bb_shield_colour) - rotate_extrude() - { - difference() { - translate([0,-shield_width/2]) - square([bb_od/2-bb_rim,shield_width]); - circle(r = sphere_rad); - } - } + rotate_extrude() + difference() { + translate([0, -shield_width / 2]) + square([bb_od / 2 - bb_rim,shield_width]); - // rotate_extrude() - // { - // translate([0,-bb_width/2]) - // difference() { - // square([(bb_od)/2,bb_width]); - // square([bb_od/2-bb_rim,bb_width]); - // } - // } + circle(r = sphere_rad); + } - rotate_extrude() + color(colour) { + rotate_extrude() hull() { - // rim= bb_rim; - or= bb_od/2; + or = bb_od / 2; h = bb_width; translate([or - bb_rim, -h / 2 + chamfer]) square([bb_rim, h - 2 * chamfer]); @@ -120,25 +111,24 @@ description = str("Rod End Bearing ", type[1], length < 10 ? " x " : " x ", len translate([or - bb_rim, -h / 2]) square([bb_rim - chamfer, h]); } - translate([0,0,-bb_width/2+chamfer]) - linear_extrude(bb_width-chamfer*2){ - difference() { - - hull(){ - circle(r = bb_od/2); - translate([length-thread,-shaft_rad]) - square([0.5,shaft_rad*2]); - } - circle(r = bb_od/2-bb_rim); - } + + translate_z(-bb_width/2+chamfer) + linear_extrude(bb_width-chamfer*2) + difference() { + hull() { + circle(r = bb_od/2); + translate([length-thread,-shaft_rad]) + square([0.5,shaft_rad*2]); + } + circle(r = bb_od/2-bb_rim); + } } } - shaft(); - rotate([0,90,0]) - bearingEye(); + shaft(); - // square() -} \ No newline at end of file + rotate([0,90,0]) + bearingEye(); +} diff --git a/vitamins/rod_ends.scad b/vitamins/rod_ends.scad index 10ed3cd..f7f0af3 100644 --- a/vitamins/rod_ends.scad +++ b/vitamins/rod_ends.scad @@ -1,5 +1,23 @@ -RE_m5_bearing = ["rodEndBearingM5", 5, 16, 8, 6, "gold", 5, 8, 11.11, 33, 21, 41, 2.0, 2.0, 0, 0]; // uxcell M5x0.8 Right Hand Thread, Self-Lubricating Joint Rod Ends +// +// NopSCADlib Copyright Chris Palmer 2024 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// +RE_m5_bearing = ["RE_m5_bearing", 5, 16, 8, 6, brass, 5, 8, 11.11, 33, 21, 41, 2.0, 2.0, 0, 0]; // uxcell M5x0.8 Right Hand Thread, Self-Lubricating Joint Rod Ends rod_ends= [ RE_m5_bearing]; -use \ No newline at end of file +use