Tweaks to make interface consistent with blowers.
Added blower_exit_offset(). Fixed corner shape and exit dimensions. Updated images and readme.
This commit is contained in:
parent
3f359f6839
commit
f751dd9a73
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 839 KiB After Width: | Height: | Size: 841 KiB |
10
readme.md
10
readme.md
|
@ -296,11 +296,18 @@ Models of radial blowers.
|
||||||
| ```blower_wall(type)``` | Side wall thickness |
|
| ```blower_wall(type)``` | Side wall thickness |
|
||||||
| ```blower_width(type)``` | Width of enclosing rectangle |
|
| ```blower_width(type)``` | Width of enclosing rectangle |
|
||||||
|
|
||||||
|
### Functions
|
||||||
|
| Function | Description |
|
||||||
|
|:--- |:--- |
|
||||||
|
| ```blower_casing_is_square(type)``` | True for square radial fans, false for spiral shape radial blowers |
|
||||||
|
| ```blower_exit_offset(type)``` | Offset of exit's centre from the edge |
|
||||||
|
|
||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```blower(type)``` | Draw specified blower |
|
| ```blower(type)``` | Draw specified blower |
|
||||||
| ```blower_hole_positions(type)``` | Translate children to screw hole positions |
|
| ```blower_hole_positions(type)``` | Translate children to screw hole positions |
|
||||||
|
| ```blower_square(type)``` | Draw a square blower |
|
||||||
|
|
||||||
![blowers](tests/png/blowers.png)
|
![blowers](tests/png/blowers.png)
|
||||||
|
|
||||||
|
@ -309,8 +316,11 @@ Models of radial blowers.
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
|
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
|
||||||
| 1 | ```blower(RB5015)``` | Blower Runda RB5015 |
|
| 1 | ```blower(RB5015)``` | Blower Runda RB5015 |
|
||||||
|
| 4 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm |
|
||||||
| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm |
|
| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm |
|
||||||
| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
||||||
|
| 1 | ```blower(BL40x10)``` | Square radial 4010 |
|
||||||
|
| 4 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||||
| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 49 KiB |
|
@ -22,6 +22,7 @@
|
||||||
//
|
//
|
||||||
include <../utils/core/core.scad>
|
include <../utils/core/core.scad>
|
||||||
use <../utils/rounded_cylinder.scad>
|
use <../utils/rounded_cylinder.scad>
|
||||||
|
use <../utils/quadrant.scad>
|
||||||
use <screw.scad>
|
use <screw.scad>
|
||||||
|
|
||||||
function blower_length(type) = type[2]; //! Length of enclosing rectangle
|
function blower_length(type) = type[2]; //! Length of enclosing rectangle
|
||||||
|
@ -40,6 +41,9 @@ function blower_top(type) = type[14]; //! Thickness of the top
|
||||||
function blower_wall(type) = type[15]; //! Side wall thickness
|
function blower_wall(type) = type[15]; //! Side wall thickness
|
||||||
function blower_lug(type) = type[16]; //! Height of the lugs
|
function blower_lug(type) = type[16]; //! Height of the lugs
|
||||||
|
|
||||||
|
function blower_casing_is_square(type) = len(blower_screw_holes(type)) > 3; //! True for square radial fans, false for spiral shape radial blowers
|
||||||
|
function blower_exit_offset(type) = blower_casing_is_square(type) ? blower_length(type) / 2 : blower_exit(type) / 2; //! Offset of exit's centre from the edge
|
||||||
|
|
||||||
fan_colour = grey(20);
|
fan_colour = grey(20);
|
||||||
|
|
||||||
module blower_fan(type, casing_is_square) {
|
module blower_fan(type, casing_is_square) {
|
||||||
|
@ -73,17 +77,18 @@ module blower_square(type) { //! Draw a square blower
|
||||||
wall = blower_wall(type);
|
wall = blower_wall(type);
|
||||||
hole_pitch = (blower_screw_holes(type)[1].x - blower_screw_holes(type)[0].x) / 2;
|
hole_pitch = (blower_screw_holes(type)[1].x - blower_screw_holes(type)[0].x) / 2;
|
||||||
corner_radius = width / 2 - hole_pitch;
|
corner_radius = width / 2 - hole_pitch;
|
||||||
corner_inset = (width - blower_exit(type) - blower_wall(type)) / 2;
|
corner_inset = (width - blower_exit(type)) / 2;
|
||||||
|
|
||||||
module square_inset_corners(remove_center = false)
|
module square_inset_corners(remove_center = false)
|
||||||
difference() {
|
difference() {
|
||||||
//overall outside
|
//overall outside
|
||||||
translate([0, eps, 0]) // eps y value required or difference fails, bug in OpenSCAD?
|
|
||||||
square([width, width], center = false);
|
square([width, width], center = false);
|
||||||
|
|
||||||
if (remove_center) {
|
if (remove_center) {
|
||||||
// cut out the inside, leaving the corners
|
// cut out the inside, leaving the corners
|
||||||
translate([corner_inset + wall, 0])
|
translate([corner_inset + wall, -eps])
|
||||||
square([width - 2 * (wall + corner_inset), width - wall], center = false);
|
square([width - 2 * (wall + corner_inset), width - wall + eps], center = false);
|
||||||
|
|
||||||
translate([wall, corner_inset + wall])
|
translate([wall, corner_inset + wall])
|
||||||
square([width - 2 * wall, width - 2 * (wall + corner_inset)], center = false);
|
square([width - 2 * wall, width - 2 * (wall + corner_inset)], center = false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,21 +97,26 @@ module blower_square(type) { //! Draw a square blower
|
||||||
circle(d = blower_bore(type));
|
circle(d = blower_bore(type));
|
||||||
}
|
}
|
||||||
// corner inset
|
// corner inset
|
||||||
for (x = [0, width], y = [0, width])
|
translate([width / 2, width / 2])
|
||||||
translate([x , y])
|
for(i = [0 : 3])
|
||||||
circle(r = corner_inset);
|
rotate(i * 90)
|
||||||
|
translate([-width / 2 - eps, -width/ 2 - eps])
|
||||||
|
quadrant(corner_inset, corner_inset - corner_radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
base_height = blower_base(type);
|
base_height = blower_base(type);
|
||||||
linear_extrude(base_height)
|
linear_extrude(base_height)
|
||||||
difference () {
|
difference () {
|
||||||
rounded_square([width, width], corner_radius, center = false);
|
rounded_square([width, width], corner_radius, center = false);
|
||||||
|
|
||||||
blower_hole_positions(type)
|
blower_hole_positions(type)
|
||||||
circle(d = blower_screw_hole(type));
|
circle(d = blower_screw_hole(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
translate_z(base_height)
|
translate_z(base_height)
|
||||||
linear_extrude(depth - base_height)
|
linear_extrude(depth - base_height)
|
||||||
square_inset_corners(remove_center = true);
|
square_inset_corners(remove_center = true);
|
||||||
|
|
||||||
translate_z(depth - base_height)
|
translate_z(depth - base_height)
|
||||||
linear_extrude(blower_top(type))
|
linear_extrude(blower_top(type))
|
||||||
square_inset_corners();
|
square_inset_corners();
|
||||||
|
@ -141,7 +151,7 @@ module blower(type) { //! Draw specified blower
|
||||||
|
|
||||||
vitamin(str("blower(", type[0], "): ", type[1]));
|
vitamin(str("blower(", type[0], "): ", type[1]));
|
||||||
|
|
||||||
is_square = blower_lug(type) == 0; // it's a square blower if there are no lugs
|
is_square = blower_casing_is_square(type); // Description starts with square!
|
||||||
color(fan_colour) {
|
color(fan_colour) {
|
||||||
if (is_square) {
|
if (is_square) {
|
||||||
blower_square(type);
|
blower_square(type);
|
||||||
|
@ -173,6 +183,7 @@ module blower(type) { //! Draw specified blower
|
||||||
translate(concat(blower_axis(type), [blower_base(type)]))
|
translate(concat(blower_axis(type), [blower_base(type)]))
|
||||||
circle(d = 2);
|
circle(d = 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sides
|
// sides
|
||||||
linear_extrude(depth)
|
linear_extrude(depth)
|
||||||
difference() {
|
difference() {
|
||||||
|
@ -195,6 +206,7 @@ module blower(type) { //! Draw specified blower
|
||||||
// rotor
|
// rotor
|
||||||
translate(concat(blower_axis(type), [blower_base(type) + 1]))
|
translate(concat(blower_axis(type), [blower_base(type) + 1]))
|
||||||
rounded_cylinder(r = blower_hub(type) / 2, h = blower_hub_height(type) - blower_base(type) - 1, r2 = 1);
|
rounded_cylinder(r = blower_hub(type) / 2, h = blower_hub_height(type) - blower_base(type) - 1, r2 = 1);
|
||||||
|
|
||||||
blower_fan(type, is_square);
|
blower_fan(type, is_square);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||||
// If not, see <https://www.gnu.org/licenses/>.
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
// l w d b s h a s s
|
// l w d b s h a s s e h b t w l
|
||||||
// e i e o c u x c c
|
// e i e o c u x c c x u a o a u
|
||||||
// n d p r r b i r r
|
// n d p r r b i r r i b s p l g
|
||||||
// g t t e e s e w
|
// g t t e e s e e t e l
|
||||||
// t h h w d w w
|
// t h h w d w w t
|
||||||
// h h s
|
// h h s t t
|
||||||
RB5015 = ["RB5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
RB5015 = ["RB5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
||||||
PE4020 = ["PE4020", "Blower Pengda Technology 4020", 40, 40, 20, 27.5, M3_cap_screw, 22, [21.5, 20 ], 3.2, [[37,3],[3,37],[37,37]], 29.3, 17, 1.7, 1.2, 1.3, 13];
|
PE4020 = ["PE4020", "Blower Pengda Technology 4020", 40, 40, 20, 27.5, M3_cap_screw, 22, [21.5, 20 ], 3.2, [[37,3],[3,37],[37,37]], 29.3, 17, 1.7, 1.2, 1.3, 13];
|
||||||
BL40x10 =["R4010", "Square radial 4010", 40, 40,9.5, 27, M2_cap_screw, 16, [24, 20 ], 2.4, [[2,2,1.5],[38,2,1.5],[2,38,1.5],[38,38,1.5]], 28, 9.5, 1.5, 1.5, 1.3, 0];
|
BL40x10 =["BL40x10","Square radial 4010", 40, 40,9.5, 27, M2_cap_screw, 16, [24, 20 ], 2.4, [[2,2],[38,2],[2,38],[38,38]], 30 , 9.5, 1.5, 1.5, 1.1, 1.5];
|
||||||
|
|
||||||
blowers = [BL40x10, PE4020, RB5015];
|
blowers = [BL40x10, PE4020, RB5015];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue