Skip to content
Snippets Groups Projects
Commit 7626c2a3 authored by fxk8y's avatar fxk8y :spider:
Browse files

Implementing belt stuff…

parent ba47ea31
Branches master
No related tags found
No related merge requests found
......@@ -6,3 +6,6 @@
include <gears/polygroove.scad>
# include <gears/TimingBelt.scad>
include <gears/ToothedBelt.scad>
// TODO: is this a good idea?
// Diskussion: the other modules (piping etc.) all have a 'strength'-parameter
// should we just assume a global '$str'-param, set it to our standard value here and let the user override it globally / per call / what ever ?
// this would avoid repetition and give better integration with our coding scheme!
$str = 3;
function ToothedBeltPulleyDiameter(teeth, toothDiameter) = (2 * teeth * toothDiameter) / PI;
module ToothedBeltPulleyProfile(teeth, toothDiameter=3) {
t = teeth;
td = toothDiameter;
d = ToothedBeltPulleyDiameter(t, td);
difference() {
circle(d=d);
for (rz=[0 : 360/(teeth) : 360])
rotate([0, 0, rz])
translate([0, d/2, 0])
circle(d=td);
}
}
module TimingBeltPulleyProfile(teeth, toothDiameter=3) {
t = teeth;
td = toothDiameter;
od = ToothedBeltPulleyDiameter(t, td);
echo(TimingBeltPulleyProfile_od=od);
union() {
circle(d=od);
for (rz=[0 : 360/(teeth) : 360])
rotate([0, 0, rz])
translate([0, od/2, 0])
circle(d=td);
}
}
// ToothedBeltPulleyProfile(100/2, 3*2, $fn=100);
module TimingBeltBeltProfile(teeth, toothDiameter=3, nozzle=0.4) {
// TODO: add little bit tolerance to the tooth's dia
id = ToothedBeltPulleyDiameter(teeth, toothDiameter);
od = id +2*$str +nozzle;
echo(TimingBeltBeltProfile_id=id);
echo(TimingBeltBeltProfile_od=od);
echo(TimingBeltBeltProfile_l=id*PI);
difference() {
circle(d=od);
circle(d=id);
for (rz=[0 : 360/(teeth) : 360])
rotate([0, 0, rz])
translate([0, id/2, 0])
circle(d=toothDiameter +nozzle);
}
}
$fs = 0.5;
$fa = 0.5;
$E = 0.01;
// linear_extrude(10.0) TimingBeltBeltProfile(50, $fa=0.3, $fs=0.3);
module BigPulley() {
_od = ToothedBeltPulleyDiameter(21, 3);
_h = 12.0 +5.0;
difference() {
union() {
linear_extrude(_h, convexity=10)
TimingBeltPulleyProfile(21, $fa=0.3, $fs=0.3); // ~40 mm OD
/*
// lower
translate([0, 0, -1.5])
cylinder(d1=_od+5, d2=_od, h=4);
// upper
translate([0, 0, _h -4+1.5])
cylinder(d2=_od+5, d1=_od, h=4);
*/
// lower
for (tz=[_h -$E, $E])
translate([0, 0, tz])
cylinder(d=_od +3 +3, h=1.337);
}
// central axle
cylinder(d=20, h=1000, center=true);
rotate([0, 0, 360/21/2 *0]) {
// screw hole
translate([0, 0, _h/2])
rotate([90, 0, 0])
cylinder(d=4.5, h=100);
// screw head hole
translate([0, -_od/2 +6, _h/2])
rotate([90, 0, 0])
cylinder(d=7.5, h=100);
}
}
}
module SmallPulley() {
teeth = 17;
_od = ToothedBeltPulleyDiameter(teeth, 3);
_h = 12.0;
difference() {
union() {
linear_extrude(_h, convexity=10)
TimingBeltPulleyProfile(teeth, $fa=0.3, $fs=0.3); // ~40 mm OD
/*
// lower
translate([0, 0, -1.5])
cylinder(d1=_od+5, d2=_od, h=4);
// upper
translate([0, 0, _h -4+1.5])
cylinder(d2=_od+5, d1=_od, h=4);
*/
// lower
for (tz=[_h -$E, -1.337 +$E])
translate([0, 0, tz])
cylinder(d=_od +3 +3, h=1.337);
}
// central axle
cylinder(d=5.5, h=1000, center=true);
for (rz=[0, 180])
rotate([0, 0, rz]) {
// screw hole
translate([0, 0, _h/2])
rotate([90, 0, 0])
cylinder(d=4.5, h=100);
// screw head hole
translate([0, -_od/2 +5, _h/2])
rotate([90, 0, 0])
cylinder(d=6, h=100);
// nut hole
translate([-3.5, 5, -_h*5])
cube([6, 3, _h*10]);
}
}
}
SmallPulley();
......@@ -33,6 +33,174 @@ module ToothedBeltPulleyProfile(teeth, toothDiameter=3) {
}
ToothedBeltPulleyProfile(100/2, 3*2, $fn=100);
module TimingBeltPulleyProfile(teeth, toothDiameter=3) {
t = teeth;
td = toothDiameter;
od = ToothedBeltPulleyDiameter(t, td);
echo(TimingBeltPulleyProfile_od=od);
union() {
circle(d=od);
for (rz=[0 : 360/(teeth) : 360])
rotate([0, 0, rz])
translate([0, od/2, 0])
circle(d=td);
}
}
// ToothedBeltPulleyProfile(100/2, 3*2, $fn=100);
module TimingBeltBeltProfile(teeth, toothDiameter=3, nozzle=0.4) {
// TODO: add little bit tolerance to the tooth's dia
id = ToothedBeltPulleyDiameter(teeth, toothDiameter);
od = id +2*$str +nozzle;
echo(TimingBeltBeltProfile_id=id);
echo(TimingBeltBeltProfile_od=od);
echo(TimingBeltBeltProfile_l=id*PI);
difference() {
circle(d=od);
circle(d=id);
for (rz=[0 : 360/(teeth) : 360])
rotate([0, 0, rz])
translate([0, id/2, 0])
circle(d=toothDiameter +nozzle);
}
}
$fs = 0.5;
$fa = 0.5;
$E = 0.01;
// linear_extrude(10.0) TimingBeltBeltProfile(50, $fa=0.3, $fs=0.3);
module BigPulley() {
_od = ToothedBeltPulleyDiameter(21, 3);
_h = 12.0 +5.0;
difference() {
union() {
linear_extrude(_h, convexity=10)
TimingBeltPulleyProfile(21, $fa=0.3, $fs=0.3); // ~40 mm OD
/*
// lower
translate([0, 0, -1.5])
cylinder(d1=_od+5, d2=_od, h=4);
// upper
translate([0, 0, _h -4+1.5])
cylinder(d2=_od+5, d1=_od, h=4);
*/
// lower
for (tz=[_h -$E, $E])
translate([0, 0, tz])
cylinder(d=_od +3 +3, h=1.337);
}
// central axle
cylinder(d=20, h=1000, center=true);
rotate([0, 0, 360/21/2 *0]) {
// screw hole
translate([0, 0, _h/2])
rotate([90, 0, 0])
cylinder(d=4.5, h=100);
// screw head hole
translate([0, -_od/2 +6, _h/2])
rotate([90, 0, 0])
cylinder(d=7.5, h=100);
}
}
}
module SmallPulley() {
teeth = 17;
_od = ToothedBeltPulleyDiameter(teeth, 3);
_h = 12.0;
difference() {
union() {
linear_extrude(_h, convexity=10)
TimingBeltPulleyProfile(teeth, $fa=0.3, $fs=0.3); // ~40 mm OD
/*
// lower
translate([0, 0, -1.5])
cylinder(d1=_od+5, d2=_od, h=4);
// upper
translate([0, 0, _h -4+1.5])
cylinder(d2=_od+5, d1=_od, h=4);
*/
// lower
for (tz=[_h -$E, -1.337 +$E])
translate([0, 0, tz])
cylinder(d=_od +3 +3, h=1.337);
}
// central axle
cylinder(d=5.5, h=1000, center=true);
for (rz=[0, 180])
rotate([0, 0, rz]) {
// screw hole
translate([0, 0, _h/2])
rotate([90, 0, 0])
cylinder(d=4.5, h=100);
// screw head hole
translate([0, -_od/2 +5, _h/2])
rotate([90, 0, 0])
cylinder(d=6, h=100);
// nut hole
translate([-3.5, 5, -_h*5])
cube([6, 3, _h*10]);
}
}
}
SmallPulley();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment