Leaf arm
Refactored leaf arm to a function
This commit is contained in:
62
gears.scad
62
gears.scad
@@ -29,19 +29,21 @@ SideW=tol+BackW;
|
|||||||
echo("Reference Diameter (MeshD): ", MeshD);
|
echo("Reference Diameter (MeshD): ", MeshD);
|
||||||
//rot=360/N1*$t;
|
//rot=360/N1*$t;
|
||||||
// rot=90-90*$t;
|
// rot=90-90*$t;
|
||||||
rot=90;
|
rot=0;
|
||||||
//axis_angle = -50;
|
//axis_angle = -50;
|
||||||
|
|
||||||
|
|
||||||
//meshed(rot=rot);
|
//meshed(rot=rot);
|
||||||
#meshed(rot=rot, box=true, box_top=true);
|
gear_hinge(rot=rot, box=true, box_top=true);
|
||||||
|
//translate([50,0,0]) gear_hinge(rot=rot, box=false, box_top=true);
|
||||||
|
|
||||||
|
|
||||||
module gear_sector() {
|
module gear_sector() {
|
||||||
CyS(r=MeshD, h=width, w1=215, w2=20);
|
CyS(r=MeshD, h=width, w1=215, w2=20);
|
||||||
CyS(r=MeshD/2 - 2, h=width, w1=20, w2=90);
|
CyS(r=MeshD/2 - 2, h=width, w1=20, w2=90);
|
||||||
}
|
}
|
||||||
|
|
||||||
module meshed(box=true, box_top=true, rot=0) {
|
module gear_hinge(box=true, box_top=true, rot=0) {
|
||||||
//offex=tol;
|
//offex=tol;
|
||||||
offex=0;
|
offex=0;
|
||||||
color("blue") translate([-MeshD/2 - offex,0]) rotate([0,0,rot]) blue_gear();
|
color("blue") translate([-MeshD/2 - offex,0]) rotate([0,0,rot]) blue_gear();
|
||||||
@@ -59,7 +61,7 @@ module gear_track_block() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module blue_gear() {
|
module blue_gear() {
|
||||||
intersection() {
|
render() intersection() {
|
||||||
spur_gear(n=N1, w=width, m=Module, chamfer=30, helix_angle = helix_angle );
|
spur_gear(n=N1, w=width, m=Module, chamfer=30, helix_angle = helix_angle );
|
||||||
difference() {
|
difference() {
|
||||||
gear_sector();
|
gear_sector();
|
||||||
@@ -78,16 +80,29 @@ module blue_gear() {
|
|||||||
|
|
||||||
// leaf arm
|
// leaf arm
|
||||||
//translate([MeshD/2 - 2*Module,11,0]) cube([4,20,width+1], center=true);
|
//translate([MeshD/2 - 2*Module,11,0]) cube([4,20,width+1], center=true);
|
||||||
translate([MeshD/2 - 2*Module -.75,12.5,0]) difference() {
|
translate([MeshD/2 - 2*Module - .80,12.5,0]) rotate([0,0,0]) leaf_arm();
|
||||||
cube([4,20,width+1], center=true);
|
}
|
||||||
rotate([0,90,0]) {
|
|
||||||
for (i= [-1, 1]) {
|
module red_gear()
|
||||||
translate([i*(width/2-5.25),5,-1.6])
|
{
|
||||||
cylinder(d=5.5, h=1, $fn=9, center=true);
|
render() difference() {
|
||||||
translate([i*(width/2-5.25),5,0])
|
union() {
|
||||||
cylinder(d=4.75, h=20, $fn=9, center=true);
|
CyS(r=MeshD/2 - 2, h=width, w1=90, w2=160);
|
||||||
|
intersection() {
|
||||||
|
spur_gear(n=N2, w=width, m=Module, chamfer=30, helix_angle=-helix_angle);
|
||||||
|
CyS(r=MeshD, h=width, w1=150, w2=-30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// leaf arm
|
||||||
|
translate([-MeshD/2 + 2*Module + .80,12.5,0]) leaf_arm();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// Shaft Hole
|
||||||
|
cylinder(d=ShaftD, h=width+2, 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,29 +118,6 @@ module leaf_arm() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module red_gear()
|
|
||||||
{
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
CyS(r=MeshD/2 - 2, h=width, w1=90, w2=160);
|
|
||||||
intersection() {
|
|
||||||
spur_gear(n=N2, w=width, m=Module, chamfer=30, helix_angle=-helix_angle);
|
|
||||||
CyS(r=MeshD, h=width, w1=150, w2=-30);
|
|
||||||
}
|
|
||||||
|
|
||||||
// leaf arm
|
|
||||||
translate([-MeshD/2 + 2*Module+.75,12.5,0]) leaf_arm();
|
|
||||||
|
|
||||||
}
|
|
||||||
// Shaft Hole
|
|
||||||
cylinder(d=ShaftD, h=width+2, 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module box(
|
module box(
|
||||||
d=ShaftD,
|
d=ShaftD,
|
||||||
tol=.25,
|
tol=.25,
|
||||||
|
|||||||
Reference in New Issue
Block a user