FluidSwitch/FluidSwitch_Radial.scad

changeset 2
b677773a8097
parent 1
a159ad715fe0
equal deleted inserted replaced
1:a159ad715fe0 2:b677773a8097
31 outer_thread_height = 10; 31 outer_thread_height = 10;
32 outer_height = 15; 32 outer_height = 15;
33 thread_pitch = 2; 33 thread_pitch = 2;
34 inlay_height = outlet_circle_dia / 4 + hole_inner; 34 inlay_height = outlet_circle_dia / 4 + hole_inner;
35 35
36 // adjust this to make the center hole look nice according to whicj oring you use
37 base_bottom_thickness = 9 - base_height - 0.001;
38
36 39
37 // START PROGRAM 40 // START PROGRAM
38 use <../libs/Threading/Threading.scad> 41 use <../libs/Threading/Threading.scad>
39 42
40 valve_lower(); 43 valve_lower();
41 44
45 /*
42 translate([0,0,base_height]) 46 translate([0,0,base_height])
43 valve_inlay(); 47 valve_inlay();
44 48
45 rotate([180,0,0]) translate([0,0,-outer_height - 2]) 49 rotate([180,0,0]) translate([0,0,-outer_height - 2])
46 valve_cap(); 50 valve_cap();
51 */
47 52
48 // MODULES 53 // MODULES
49 54
50 module valve_inlay() union() { 55 module valve_inlay() union() {
51 difference() { 56 difference() {
87 difference() { 92 difference() {
88 union() { 93 union() {
89 valve_base(); 94 valve_base();
90 valve_casing(); 95 valve_casing();
91 // bottom 96 // bottom
92 translate([0,0,-1.5]) cylinder(d=base_outer_dia, h=1.5); 97 translate([0,0,-base_bottom_thickness]) cylinder(d=base_outer_dia, h=base_bottom_thickness);
93 } 98 }
94 99
95 // cut out the OUTLET ring on the side 100 // cut out the OUTLET ring on the side
96 for(i = [1:outlets]) { 101 for(i = [1:outlets]) {
97 a = outlet_angle * i; 102 a = outlet_angle * i;
100 rotate([0,90,0]) 105 rotate([0,90,0])
101 cylinder(d=tube_dia, h=base_outer_dia, $fn=fn); 106 cylinder(d=tube_dia, h=base_outer_dia, $fn=fn);
102 } 107 }
103 } 108 }
104 109
110 // cut out the syringe hole (needs to be conical to fit)
111 translate([0,0,-base_bottom_thickness - 0.001])
112 cylinder(d1 = 4.5, d2 = 4, h = 9, $fn=fn);
113
114 // in my case the oring inner diameter corresponds to the syringe tip diameter (4 mm) - so I remove the inner unprintable walls of the center oring grove
115
116 translate([0,0,base_height - oring_dia / 2])
117 cylinder(d=oring_inner + oring_dia, h = 2);
118
105 } 119 }
106 // TODO: cut out the syringe hole (needs to be conical to fit)
107 120
108 121
109 module valve_casing() { 122 module valve_casing() {
110 difference() { 123 difference() {
111 union() { 124 union() {
122 135
123 module valve_base() difference() { 136 module valve_base() difference() {
124 cylinder(d=base_dia, h=base_height); 137 cylinder(d=base_dia, h=base_height);
125 138
126 // inlet hole 139 // inlet hole
127 cylinder(d=hole_inner, h=base_height, $fn=fn); 140 cylinder(d=hole_inner, h=base_height +0.001, $fn=fn);
128 translate([0,0,base_height]) 141 translate([0,0,base_height])
129 oring(); 142 oring();
130 143
131 // cut Outlet holes and oring carves 144 // cut Outlet holes and oring carves
132 for(i = [1:outlets]) { 145 for(i = [1:outlets]) {
133 a = outlet_angle * i; 146 a = outlet_angle * i;
134 rotate([0,0,a]) { 147 rotate([0,0,a]) {
135 translate([outlet_circle_dia/2,0,base_height]) 148 translate([outlet_circle_dia/2,0,base_height])
136 oring(); 149 oring();
137 translate([outlet_circle_dia/2,0]) 150 translate([outlet_circle_dia/2,0])
138 cylinder(d=hole_inner, h=base_height, $fn=fn); 151 cylinder(d=hole_inner, h=base_height + 0.001, $fn=fn);
139 } 152 }
140 } 153 }
141 154
142 } 155 }
143 156

mercurial