diff options
author | Jan Huwald <jh@sotun.de> | 2016-12-06 10:39:07 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2016-12-06 10:39:07 (GMT) |
commit | fe4885fde9e74137c66f40ace4d8d28442e91e96 (patch) | |
tree | ece9ff70980d1fde2d7e483a57432761129f1e70 /bubblemachine.scad~ |
Diffstat (limited to 'bubblemachine.scad~')
-rw-r--r-- | bubblemachine.scad~ | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/bubblemachine.scad~ b/bubblemachine.scad~ new file mode 100644 index 0000000..359310a --- /dev/null +++ b/bubblemachine.scad~ @@ -0,0 +1,217 @@ +second=70; +r_final_gear=second/2 - 5; +r_motor_gear=3; + +bublator_width=0.4 * second; +bublator_length=2*r_final_gear; + +r_hat=150/2; + +// dimensions of the nails used as pins and axis +r_nail=1.4/2; +r_nail_head=2.5/2; + +$fn=100; + +module nail_rail() { + cube([5, 200, 2], center=true); + translate([0, 0, -1.99]) cube([2, 200, 2], center=true); +} + +module motor_gear(angle=0) { + r=r_motor_gear; + rotate(angle) + difference() { + // the actual gear + cylinder(r=r, h=5, center=true); + + // pulley rim + difference() { + cylinder(r=r+1, h=3, center=true); + cylinder(r=r-0.5, h=5, center=true); + } + difference() { + cylinder(r=r+1, h=2, center=true); + cylinder(r=r-1.0, h=5, center=true); + } + + // central nail hole + cylinder(r=r_nail, h=100, center=true); + translate([0, 0, -4]) cylinder(r=r_nail_head, h=2); + } +} + +module final_gear(angle=0) { + r=r_final_gear; + rotate(angle) + difference() { + // the actual gear + cylinder(r=r, h=5, center=true); + + // pulley rim + difference() { + cylinder(r=r+1, h=3, center=true); + cylinder(r=r-0.5, h=5, center=true); + } + difference() { + cylinder(r=r+1, h=2, center=true); + cylinder(r=r-1.0, h=5, center=true); + } + + // air hole + translate([0, -r/2, 0]) + cylinder(r=0.4 * bublator_width, h=10, center=true); + + // excentrical nail hole + translate([0, r-3, 0]) { + cylinder(r=r_nail, h=100, center=true); + translate([0, 0, 1]) cylinder(r=r_nail_head, h=2); + } + + // central nail hole + cylinder(r=r_nail, h=100, center=true); + translate([0, 0, -4]) cylinder(r=r_nail_head, h=2); + } +} + +module bublator(angle=0) { + r=bublator_width; + color([0, 0.7, 0]) + translate([0, (r_final_gear-3) * (cos(angle) - 1), 0]) + difference() { + union() { + cube([bublator_width, bublator_length, 5], center=true); + translate([0, bublator_length/2 - 3, 0]) cube([r_final_gear*2 + 5, 10, 5], center=true); + } + + // bubble hole + translate([0, r_final_gear/2 - bublator_length/2, 0]) { + cylinder(r=0.4 * bublator_width, h=10, center=true); + + // nipple array ... hooray + for (i = [1:30]) + for (j = [-1,1]) + rotate(i * 360/30) + translate([0, 0.4 * bublator_width - 0.5, 0]) + rotate([90 + j*70, 0, 0]) + rotate([0, 0, 45]) + cylinder(r1=0, r2=3.5, h=6, center=true, $fn=100); + } + + // nail hole + translate([0, bublator_length/2 - 3, 0]) + cube([2*(r_final_gear - 2), 2.5 * r_nail, 50], center=true); + } +} + +module assembly_clearance() { + translate([0, 18, -1]) + linear_extrude(170) + minkowski() { + square(0.3, center=true); + + projection() + rotate([90,0,0]) moving_assembly(); + } +} + +module arc(r, d) { + intersection() { + translate([0, -r + d, 0]) circle(r); + translate([0, 500]) square([1000, 1000], center=true); + } +} + +module tank() { + color([0.3, 0.3, 0.9]) + translate([0, -18, -2*r_final_gear]) + difference() { + union() { + // bottom + linear_extrude(1.5) arc(r_hat, 30); + + // flooding protection floor + translate([0, 0, 2*r_final_gear - 2]) + linear_extrude(1.5) arc(r_hat, 30); + + // walls + linear_extrude(4 * r_final_gear + 2) + difference() { + arc(r_hat, 30); + translate([0, 1.5, 0]) arc(r_hat, 27); + } + + // bublator_rails + for (i = [-1,1]) + translate([i*r_final_gear, 18, 2*r_final_gear + 0.5]) + rotate(-i*25) + cube([10, 10, 4*r_final_gear], center=true); + + // gear holding protrusion + translate([0,0,1.6*r_final_gear]) + intersection() { + rotate([-90, 0, 0]) + translate([0, -20, 0]) + cylinder(r=r_final_gear, h=70, center=true); + + translate([0, 5, 30]) + cube([100, 9.7, 40], center=true); + } + } + + // rear air hole + translate([0,0,1.6*r_final_gear]) + rotate([-90, 0, 0]) + translate([0, -27, 0]) + cylinder(r=0.4*r_final_gear, h=50, center=true); + + // front air hole + translate([0,0,1.6*r_final_gear]) + rotate([-90, 0, 0]) + translate([0, -27, 30]) + rotate([30, 0, 0]) + cylinder(r1=0.31*r_final_gear, r2=0.85*r_final_gear, h=30, center=true); + + assembly_clearance(); + + // pulley clearance + translate([-r_final_gear - 90, 11, 2*r_final_gear]) + cube([100, 3, 2*r_final_gear - 2]); + + // gear axis hole + translate([0, 20, 3 * r_final_gear]) + rotate([90, 0, 0]) + cylinder(r=r_nail, h=100); + + // bublator screw assembly hole + translate([0, 0, 4*r_final_gear]) + rotate([90, 0, 0]) + #cylinder(r=20, h=30, center=true); + } +} + +module cage() { + linear_extrude(2*r_final_gear) + assembly_clearance(); + + tank(); +} + +module moving_assembly(angle=0) { + // distance 0.25 mm between objects + translate([0, 0, 5.25]) final_gear(a); + translate([0, -bublator_length/2 + second/2 - 5, 0]) bublator(a); +} + +a=0;//$t * 1000; + +translate([0, 0, r_final_gear]) +rotate([90, 0, 0]) +moving_assembly(a); +tank(); + +translate([-70, -5, r_final_gear - 20]) +rotate([90, 0, 0]) +motor_gear(); + +! tank();
\ No newline at end of file |