Decent print.

Lead arms need work.
This commit is contained in:
2020-01-10 14:31:21 -05:00
committed by sjc
parent 3ea8a73f40
commit 98ed0cb339

View File

@@ -7,7 +7,7 @@ N = 9;
N1=N;
N2=N;
axis_angle = 0;
Module=1.3;
Module=2;
ShaftD=4.5;
MeshD=Module*(N1+N2)/2;
@@ -23,47 +23,79 @@ SideW=tol+BackW;
echo("Reference Diameter (MeshD): ", MeshD);
//rot=360/N1*$t;
//rot=90-90*$t;
rot=90;
rot=80;
//axis_angle = -50;
color("blue") translate([-MeshD/2,0]) rotate([0,0,rot]) {
render() intersection() {
spur_gear(n=N1, w=width, m=Module,helix_angle=constant(axis_angle/2));
difference() {
CyS(r=MeshD, h=width, w1=215, w2=20);
// Shaft Hole
cylinder(d=ShaftD, h=12, center=true, $fn=16);
// Block limit
translate([-BackW+2*tol,-MeshD/2,0]) cube([MeshD,MeshD,width], center=true);
}
}
meshed(rot=rot);
//meshed(box=false);
// leaf arm
translate([MeshD/2 - 2.5,4,0]) cube([2,8,5], center=true);
//gear_sector();
module gear_sector() {
CyS(r=MeshD, h=width, w1=215, w2=20);
CyS(r=MeshD/2 - 2, h=width, w1=20, w2=90);
}
color ("red") translate([MeshD/2,0]) rotate([0,0,-rot]){
module meshed(box=true, rot=0) {
//offex=tol;
offex=0;
color("blue") translate([-MeshD/2 - offex,0]) rotate([0,0,rot]) blue_gear();
color ("red") translate([offex + MeshD/2,0]) rotate([0,0,-rot]) red_gear();
if (box) {
color("green") box(full = true, top=false, tol=tol, ShaftFN=21);
}
}
module gear_track_block() {
difference() {
CyS(r=MeshD/2 - Module/2, h=width, w1=260, w2=270);
CyS(r=ShaftD+1, h=width, w1=259, w2=271);
}
}
module blue_gear() {
render() intersection() {
spur_gear(n=N1, w=width, m=Module,helix_angle=constant(axis_angle/2));
difference() {
gear_sector();
// Shaft Hole
cylinder(d=ShaftD, h=12, center=true, $fn=21);
// Block limit - back
translate([-BackW+2*tol,-MeshD/2,0]) cube([MeshD,MeshD,width], center=true);
// Block limit - front
translate([0,0,-width/2]) cube([1,MeshD/2,width]);
}
}
// Rear Block
gear_track_block();
// leaf arm
translate([MeshD/2 - 2*Module,7,0]) cube([3,12,width+1], center=true);
}
module red_gear()
{
render() {
difference() {
union() {
CyS(r=MeshD/2 - 2, h=width, w1=90, w2=160);
intersection() {
spur_gear(n=N2, w=width, m=Module, helix_angle=constant(axis_angle/2));
CyS(r=MeshD, h=width, w1=150, w2=-30);
}
// leaf arm
translate([-MeshD/2 + 2.5,4,0]) cube([2,8,5], center=true);
translate([-MeshD/2 + 2*Module,7,0]) cube([3,12,width+1], center=true);
// Block
//translate([+MeshD/2 - 1,-1,0]) cube([1.5,6,5], center=true);
//translate([3.5,-3.5,0]) rotate([0,0,-45]) cube([4,1.85,4], center=true);
CyS(r=MeshD - 3, h=width, w1=-55, w2=-30);
}
// Shaft Hole
cylinder(d=ShaftD, h=12, center=true, $fn=16);
cylinder(d=ShaftD, h=12, center=true, $fn=21);
// Block limit -front
translate([-Module/2,1,-width/2]) cube([Module,MeshD/2,width]);
// Block limit
translate([BackW-2*tol,-MeshD/2,0]) cube([MeshD,MeshD,width+1], center=true);
}
@@ -72,7 +104,8 @@ color ("red") translate([MeshD/2,0]) rotate([0,0,-rot]){
module box(
d=ShaftD,
tol=.3,
tol=.25,
top=true,
ShaftFN=$fn,
MeshD=MeshD,
Module=Module,
@@ -84,30 +117,30 @@ module box(
BackW=WallD/2 + Swing+Module+1;
SideW=tol -1 + BackW-MeshD/2;
if (full == true) {
mirror([1,0,0]) box(d=d, tol=tol, ShaftFN=ShaftFN, full=false);
mirror([1,0,0]) box(d=d, tol=tol, ShaftFN=ShaftFN, top=top, full=false);
}
translate([MeshD/2,0]) {
// Shaft
cylinder(d=d-tol, h=width+1,$fn=ShaftFN, center=true);
cylinder(d=d-2*tol, h=width+2,$fn=ShaftFN, center=true);
// Bottom
translate([0,0,-width/2 - WallD/2 - tol])cylinder(d=d+2*tol, h=WallD,$fn=ShaftFN, center=true);
// Front Wall
translate([BackW/2 - SideW +1,0]) cube([SideW+tol,WallD,width+1], center=true);
translate([BackW/2 - SideW +1,0]) cube([SideW+tol,WallD,width+1+2*tol], center=true);
// Side Wall
translate([SideW,-Swing/2]) cube([WallD,Swing+WallD,width+1], center=true);
translate([SideW,-Swing/2]) cube([WallD,Swing+WallD,width+1+2*tol], center=true);
}
// Back Wall
translate([BackW/2,-Swing,0]) cube([BackW,WallD,width+1],center=true);
translate([BackW/2,-Swing,0]) cube([BackW,WallD,width+1+2*tol],center=true);
// Bottom/Top
translate([BackW/2,-(Swing)/2,-width/2 - WallD/2 - tol])
cube([BackW,Swing+WallD,WallD], center=true);
translate([BackW/2,-(Swing)/2,width/2 + WallD/2 + tol])
if (top) {
translate([BackW/2,-(Swing)/2,+width/2 + WallD/2 + 2*tol])
cube([BackW,Swing+WallD,WallD], center=true);
}
translate([BackW/2,-(Swing)/2,-width/2 - WallD/2 - 2*tol])
difference() {
cube([BackW,Swing+WallD,WallD], center=true);
translate([-Swing/2,0,0]) cube([BackW/2, Swing/2,4],center=true);
translate([-Swing/2,Swing/4,0]) cube([BackW/1.25, Swing/3,4],center=true);
}
}
color("green") {
box(full = true, ShaftFN=16);
}