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:
Chris Palmer 2020-11-18 11:31:40 +00:00
parent 3f359f6839
commit f751dd9a73
5 changed files with 40 additions and 18 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View File

@ -296,11 +296,18 @@ Models of radial blowers.
| ```blower_wall(type)``` | Side wall thickness |
| ```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
| Module | Description |
|:--- |:--- |
| ```blower(type)``` | Draw specified blower |
| ```blower_hole_positions(type)``` | Translate children to screw hole positions |
| ```blower_square(type)``` | Draw a square blower |
![blowers](tests/png/blowers.png)
@ -309,8 +316,11 @@ Models of radial blowers.
| ---:|:--- |:---|
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
| 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 |
| 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 |
| 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

View File

@ -22,6 +22,7 @@
//
include <../utils/core/core.scad>
use <../utils/rounded_cylinder.scad>
use <../utils/quadrant.scad>
use <screw.scad>
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_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);
module blower_fan(type, casing_is_square) {
@ -73,17 +77,18 @@ module blower_square(type) { //! Draw a square blower
wall = blower_wall(type);
hole_pitch = (blower_screw_holes(type)[1].x - blower_screw_holes(type)[0].x) / 2;
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)
difference() {
//overall outside
translate([0, eps, 0]) // eps y value required or difference fails, bug in OpenSCAD?
square([width, width], center = false);
if (remove_center) {
// cut out the inside, leaving the corners
translate([corner_inset + wall, 0])
square([width - 2 * (wall + corner_inset), width - wall], center = false);
translate([corner_inset + wall, -eps])
square([width - 2 * (wall + corner_inset), width - wall + eps], center = false);
translate([wall, corner_inset + wall])
square([width - 2 * wall, width - 2 * (wall + corner_inset)], center = false);
} else {
@ -92,21 +97,26 @@ module blower_square(type) { //! Draw a square blower
circle(d = blower_bore(type));
}
// corner inset
for (x = [0, width], y = [0, width])
translate([x , y])
circle(r = corner_inset);
translate([width / 2, width / 2])
for(i = [0 : 3])
rotate(i * 90)
translate([-width / 2 - eps, -width/ 2 - eps])
quadrant(corner_inset, corner_inset - corner_radius);
}
base_height = blower_base(type);
linear_extrude(base_height)
difference () {
rounded_square([width, width], corner_radius, center = false);
blower_hole_positions(type)
circle(d = blower_screw_hole(type));
}
translate_z(base_height)
linear_extrude(depth - base_height)
square_inset_corners(remove_center = true);
translate_z(depth - base_height)
linear_extrude(blower_top(type))
square_inset_corners();
@ -141,7 +151,7 @@ module blower(type) { //! Draw specified blower
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) {
if (is_square) {
blower_square(type);
@ -173,6 +183,7 @@ module blower(type) { //! Draw specified blower
translate(concat(blower_axis(type), [blower_base(type)]))
circle(d = 2);
}
// sides
linear_extrude(depth)
difference() {
@ -195,6 +206,7 @@ module blower(type) { //! Draw specified blower
// rotor
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);
blower_fan(type, is_square);
}
}

View File

@ -16,15 +16,15 @@
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
// l w d b s h a s s
// e i e o c u x c c
// n d p r r b i r r
// g t t e e s e w
// t h h w d w w
// h h 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 x u a o a u
// n d p r r b i r r i b s p l g
// g t t e e s e e t e l
// t h h w d w w t
// 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];
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];