1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-31 03:00:00 +02:00

Added rod_ends.scad to lib.scad and lib_test.scad.

Fixed rod_end colours.
Added new pulleys to the test list and reodered.
Printed pulleys nopw shown in two rows.
Updated images and readme.
This commit is contained in:
Chris Palmer
2024-09-02 21:50:27 +01:00
parent f03e32cd1e
commit 4f073f97e8
35 changed files with 317 additions and 185 deletions

View File

@@ -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) {

View File

@@ -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];

View File

@@ -26,7 +26,7 @@ include <belts.scad>
// 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 <pulley.scad>

View File

@@ -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 <https://www.gnu.org/licenses/>.
//
//
//! 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 <NopSCADlib/utils/core/core.scad>
include <NopSCADlib/utils/thread.scad>
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()
}
rotate([0,90,0])
bearingEye();
}

View File

@@ -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 <https://www.gnu.org/licenses/>.
//
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<rod_end.scad>
use<rod_end.scad>