/* ******************************************* Objekt Info: Zahnrad Spiel 6 Teile drucken ******************************************* Version: 29.09.2022 khf ******************************************* */ //*************** Parameter ************* $fn = 96; Module = 2; // Groesse 2 entspricht D=30mm width = 5.0; // 5mm teeth = 14; // 14 Zaehne bore = 17; // Bohrung D=17mm straight = true; //***************************************** /* [Erweiterte Parameter] */ hub = true; hub_diameter = 6; // 0.01 hub_thickness = 5; // 0.01 optimized = true; pressure_angle = 25; // 0.01 clearance = 0.05; // 0.01 //************** Programm ************** //translate([0,-13,0]) //cube(size = [5,16.5,5], center = true); module Aussparung (){ translate([-4,0,7]) rotate([90,90,0]) cube([12,8,17]); } module Halter () { translate([24.5,0,5]) union(){ difference() { union(){ rotate([90,180,0]) translate([20,0,0]) cube([9,5,21]); translate([-24.5,0,-5]) cylinder(d=9,h=5); } //Loch oben translate([-24.5,0,-7]) cylinder(d=5.2,h=8); translate([-21,-3.5,2]) rotate([90,180,0]) cube([7,9,22]); } rotate([90,90,90]) translate([2.5,-21,-21]) cylinder(d=5,h=1); rotate([90,90,90]) translate([2.5,-21,-29]) cylinder(d=5,h=1); rotate([90,90,90]) translate([2.5,-21,-28]) cylinder(d=5,h=1.5); rotate([90,90,90]) translate([2.5,-21,-22.5]) cylinder(d=5,h=1.5); } } module customizer_separator() {} finalHelixAngle = straight ? 0 : helix_angle; final_hub_diameter = hub ? hub_diameter : 0; final_hub_thickness = hub ? hub_thickness : 0; // Allgemeine Variablen pi = 3.14159; rad = 57.29578; spiel = clearance; // Spiel zwischen Zaehnen /* Wandelt Radian in Grad um */ function grad(eingriffswinkel) = eingriffswinkel*rad; /* Wandelt Grad in Radian um */ function radian(eingriffswinkel) = eingriffswinkel/rad; /* Wandelt 2D-Polarkoordinaten in kartesische um Format: radius, phi; phi = Winkel zur x-Achse auf xy-Ebene */ function pol_zu_kart(polvect) = [ polvect[0]*cos(polvect[1]), polvect[0]*sin(polvect[1]) ]; /* Kreisevolventen-Funktion: Gibt die Polarkoordinaten einer Kreisevolvente aus r = Radius des Grundkreises rho = Abrollwinkel in Grad */ function ev(r,rho) = [ r/cos(rho), grad(tan(rho)-radian(rho)) ]; module stirnrad(modul, zahnzahl, breite, bohrung, nabendicke=0, nabendurchmesser=0, eingriffswinkel = 20, schraegungswinkel = 0, optimiert = true) { // Dimensions-Berechnungen d = modul * zahnzahl; // Teilkreisdurchmesser r = d / 2; // Teilkreisradius alpha_stirn = atan(tan(eingriffswinkel)/cos(schraegungswinkel));// Schraegungswinkel im Stirnschnitt db = d * cos(alpha_stirn); // Grundkreisdurchmesser rb = db / 2; // Grundkreisradius da = (modul <1)? d + modul * 2.2 : d + modul * 2; // Kopfkreisdurchmesser nach DIN 58400 bzw. DIN 867 ra = da / 2; // Kopfkreisradius c = (zahnzahl <3)? 0 : modul/6; // Kopfspiel df = d - 2 * (modul + c); // Fusskreisdurchmesser rf = df / 2; // Fusskreisradius rho_ra = acos(rb/ra); // maximaler Abrollwinkel; // Evolvente beginnt auf Grundkreis und endet an Kopfkreis rho_r = acos(rb/r); // Abrollwinkel am Teilkreis; // Evolvente beginnt auf Grundkreis und endet an Kopfkreis phi_r = grad(tan(rho_r)-radian(rho_r)); // Winkel zum Punkt der Evolvente auf Teilkreis gamma = rad*breite/(r*tan(90-schraegungswinkel)); // Torsionswinkel fuer Extrusion schritt = rho_ra/16; // Evolvente wird in 16 Stuecke geteilt tau = 360/zahnzahl; // Teilungswinkel r_loch = (2*rf - bohrung)/8; // Radius der Loecher fuer Material-/Gewichtsersparnis rm = bohrung/2+2*r_loch; // Abstand der Achsen der Loecher von der Hauptachse z_loch = floor(2*pi*rm/(3*r_loch)); // Anzahl der Loecher fuer Material-/Gewichtsersparnis optimiert = (optimiert && r >= breite*1.5 && d > 2*bohrung); // ist Optimierung sinnvoll? // Zeichnung union(){ rotate([0,0,-phi_r-90*(1-spiel)/zahnzahl]){ // Zahn auf x-Achse zentrieren; // macht Ausrichtung mit anderen Raedern einfacher linear_extrude(height = breite, twist = gamma){ difference(){ union(){ zahnbreite = (180*(1-spiel))/zahnzahl+2*phi_r; circle(rf); // Fusskreis for (rot = [0:tau:360]){ rotate (rot){ // "Zahnzahl-mal" kopieren und drehen polygon(concat( // Zahn [[0,0]], // Zahnsegment beginnt und endet im Ursprung [for (rho = [0:schritt:rho_ra]) // von null Grad (Grundkreis) // bis maximalen Evolventenwinkel (Kopfkreis) pol_zu_kart(ev(rb,rho))], // Erste Evolventen-Flanke [pol_zu_kart(ev(rb,rho_ra))], // Punkt der Evolvente auf Kopfkreis [for (rho = [rho_ra:-schritt:0]) // von maximalen Evolventenwinkel (Kopfkreis) // bis null Grad (Grundkreis) pol_zu_kart([ev(rb,rho)[0], zahnbreite-ev(rb,rho)[1]])] // Zweite Evolventen-Flanke // (180*(1-spiel)) statt 180 Grad, // um Spiel an den Flanken zu erlauben ) ); } } } circle(r = rm+r_loch*1.49); // "Bohrung" } } } // mit Materialersparnis if (optimiert) { linear_extrude(height = breite){ difference(){ circle(r = (bohrung+r_loch)/2); circle(r = bohrung/2); // Bohrung } } linear_extrude(height = (breite-r_loch/2 < breite*2/3) ? breite*2/3 : breite-r_loch/2){ difference(){ circle(r=rm+r_loch*1.51); union(){ circle(r=(bohrung+r_loch)/2); for (i = [0:1:z_loch]){ translate(kugel_zu_kart([rm,90,i*360/z_loch])) circle(r = r_loch); } } } } } // ohne Materialersparnis else { difference(){ union(){ linear_extrude(height = breite){ circle(r = rm+r_loch*1.51); } linear_extrude(height = breite+nabendicke){ circle(r = nabendurchmesser/2); } } translate([0,0,-breite/2]){ linear_extrude(height = (breite+nabendicke)*2){ circle(r = bohrung/2); } } } } } } difference() { stirnrad (modul=Module, zahnzahl=teeth, breite=width, bohrung=bore, nabendurchmesser=final_hub_diameter, nabendicke=final_hub_thickness, eingriffswinkel=pressure_angle, schraegungswinkel=finalHelixAngle, optimiert=optimized); Aussparung(); } Halter();