Skip to content

Commit

Permalink
Simplify valve topology
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 committed May 29, 2020
1 parent 77b7d7f commit 8988fdb
Show file tree
Hide file tree
Showing 6 changed files with 71,671 additions and 132,514 deletions.
83 changes: 28 additions & 55 deletions library/valves/georges.scad
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
use <../../library/primitives/tube.scad>;
use <../../library/connectors/hose/barb.scad>;
module georges(
diameter=[15, 45],
length=10,
wall=1,
diameter=[35, 15],
length=12,
wall=2,
barb=[6, 10, 0.66, 5],
channel=0.4,
angle=40
angle=22.5
) {
/// Creates a Georges CPAP virtual valve.
///
Expand All @@ -37,61 +37,34 @@ module georges(
/// ```
/// georges();
/// ```
translate([0, 0, length]) mirror([0, 0, 1]) {
difference() {
cylinder(r=diameter[1] / 2, h=length);
cylinder(r=diameter[0] / 2, h=length);
translate([0, 0, wall]) {
tube(
wall=-wall,
diameter=diameter[1] - 2 * wall,
length=length - 2 * wall
);
}
translate([0, 0, length - 3 * wall]) {
tube(
wall=-(2 * wall + channel),
diameter=diameter[1] - 2 * wall,
length=2 * wall
);
}
translate([
0, 0,
length - (diameter[1] - 2 * wall) * tan(angle) / 4 - wall
]) {
secant = sqrt(pow(tan(angle), 2) + 1) / tan(angle);
chamber = (diameter[0] - diameter[1]) / 2 - 2 * wall;

difference() {
tube(
diameter=diameter[0],
length=length,
wall=(diameter[1] - diameter[0]) / 2
);
translate([0, 0, wall]) {
tube(
diameter=diameter[0] - 2 * wall,
length=chamber,
wall=-[chamber, 2 * channel * secant]
);
translate([0, 0, chamber]) {
tube(
diameter=[diameter[0], diameter[1] - 2 * wall],
length=(diameter[1] - 2 * wall) * tan(angle) / 4,
wall=[-channel, -wall]
diameter=[diameter[0] - 2 * wall, diameter[1]],
length=(chamber + wall) * tan(angle),
wall=-[2 * channel, channel]
);
}
difference() {
translate([0, -diameter[1] / 2 + 2 * wall , length / 2]) {
rotate([90, 0, 0]) {
barb(barb[0], barb[1], wall=barb[0] / 2, barb=barb[2]);
}
}
// preserve wall thickness at barb junction
translate([-barb[0]/2 - 0.1, -diameter[1] / 2 + 1 * wall - 2, length - wall]) cube([barb[0] + 0.2, barb[0], wall]);
translate([-barb[0]/2 - 0.1, -diameter[1] / 2 + 1 * wall - 2, 0]) cube([barb[0] + 0.2, barb[0], wall]);
}
}

translate([0, -diameter[1] / 2 + wall, length / 2]) {
rotate([90, 0, 0]) {
barb(barb[0], barb[1], clearance=barb[3], wall=barb[0] / 8, barb=barb[2]);
}
}
for(support = [0:12:360]) {
rotate([0, 0, support]) {
translate([diameter[0] / 2 + wall, -wall, length - 3 * wall - 0.1]) {
cube([
(diameter[1] - diameter[0]) / 2 - 2 * wall,
wall,
2 * wall + channel
]);
}
}
translate([0, 2 * wall - diameter[0] / 2, barb[0] / 2 + barb[2]]) rotate([90, 0, 0]) {
tube(barb[0] + 2 * barb[2] - 2 * wall, barb[1], -(barb[0] / 2 + barb[2] - wall));
}
}
translate([0, wall - diameter[0] / 2, barb[0] / 2 + barb[2]]) rotate([90, 0, 0]) {
barb(barb[0], barb[1], wall=wall - barb[2], barb=barb[2], clearance=barb[3]);
}
}
Binary file modified mask.3mf
Binary file not shown.
38 changes: 13 additions & 25 deletions mask.scad
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,14 @@ $fn=128; // Face number: 128 for quality, 16 for speed.


module valve() {
intersection(){
georges(
diameter=[15, 45],
length=10,
wall=1,
barb=[10, 30, 0.66, 20],
channel=0.4,
angle=40
);
translate([0, 0, 10]) {
mirror([0, 0, 1]) {
ISO5356_1(diameter=15, type="female", wall=45);
}
}
}
union() {
translate([0, 0, 10]) ISO5356_1(diameter=22, length=25, type="male");
translate([0, 0, 10]) tube(diameter=21, length=25, wall=-2.9);
}
georges(
diameter=[40, 15],
length=18,
wall=2,
barb=[10, 30, 0.66, 20],
channel=0.4,
angle=35
);
}


Expand All @@ -60,14 +49,15 @@ module mask() {
}
}
}
translate([0, 0, -0.05]) cylinder(10, d=44.99);
translate([0, 0, -0.05]) cylinder(38, d=21.8);
translate([0, -15, 5]) rotate([90, 0, 0]) cylinder(35, d=9.9);
cylinder(18, d=40);
cylinder(38, d=15);
translate([0, -15, 5.66]) rotate([90, 0, 0]) cylinder(35, d=10);
translate([0, 25, 1]) cylinder(35, d=5);
translate([0, 26, 3]) rotate([270, 0, 0]) cylinder(35, d1=5);
}
}


difference() {
union() {
mask();
Expand All @@ -79,6 +69,4 @@ difference() {
}
// cut off the bottom of the barb for ease of printing
translate([0, 0, -1.5]) cube([50, 150, 3], center=true);
}


}
Loading

0 comments on commit 8988fdb

Please sign in to comment.