Concept only
This commit is contained in:
parent
109dd3e67d
commit
d2dc63700f
1 changed files with 197 additions and 0 deletions
197
scad/YOOPAI_round_to_rectangular_duct_transition_adapter.scad
Normal file
197
scad/YOOPAI_round_to_rectangular_duct_transition_adapter.scad
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
//
|
||||
// duct_round_to_window_slot.scad
|
||||
// 20260321 ChatGPT
|
||||
// $Id$
|
||||
// $HeadURL$
|
||||
//
|
||||
// Example command lines:
|
||||
//
|
||||
// openscad -o duct_round_to_window_slot_20260321_1830.stl duct_round_to_window_slot.scad
|
||||
//
|
||||
// openscad \
|
||||
// -D 'round_stub_od=72.0' \
|
||||
// -D 'round_fit_clearance=0.6' \
|
||||
// -D 'slot_h=25.4' \
|
||||
// -D 'slot_w=162.0' \
|
||||
// -D 'wall=2.4' \
|
||||
// -D 'round_stub_len=30' \
|
||||
// -D 'transition_len=140' \
|
||||
// -D 'slot_stub_len=30' \
|
||||
// -o duct_round_to_window_slot_20260321_1831.stl \
|
||||
// duct_round_to_window_slot.scad
|
||||
//
|
||||
|
||||
$fn = 128;
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// PARAMETERS
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// Measured OD of the existing plastic tent outlet that your flex duct
|
||||
// currently wraps around.
|
||||
round_stub_od = 72.0;
|
||||
|
||||
// Extra diameter added so the flex duct can slip over this printed stub.
|
||||
// Start with 0.4 to 0.8 mm and adjust after a test print.
|
||||
round_fit_clearance = 0.6;
|
||||
|
||||
// Wall thickness
|
||||
wall = 2.4;
|
||||
|
||||
// Length of straight circular collar for flex duct attachment
|
||||
round_stub_len = 30;
|
||||
|
||||
// Length of tapered transition body
|
||||
transition_len = 140;
|
||||
|
||||
// Length of straight rectangular outlet section for insertion under window
|
||||
slot_stub_len = 30;
|
||||
|
||||
// Window slot internal size
|
||||
slot_h = 25.4; // 1.0 inch
|
||||
slot_w = 162.0; // approximately area-preserving for 72 mm round
|
||||
|
||||
// Corner radius for rounded rectangle, internal passage
|
||||
slot_r = 6.0;
|
||||
|
||||
// Optional lip / stop ring on circular end so the duct has something
|
||||
// to register against before clamp/strap tightening.
|
||||
add_round_stop_ring = true;
|
||||
round_stop_ring_len = 5.0;
|
||||
round_stop_ring_extra_od = 6.0;
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// DERIVED VALUES
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// This is the OD of the printed round collar that the flexible duct
|
||||
// will fit around.
|
||||
round_outer_d = round_stub_od + round_fit_clearance;
|
||||
|
||||
// Inner flow diameter at the round side
|
||||
round_inner_d = round_outer_d - 2*wall;
|
||||
|
||||
// Outer dimensions of the rectangular outlet
|
||||
slot_outer_h = slot_h + 2*wall;
|
||||
slot_outer_w = slot_w + 2*wall;
|
||||
slot_outer_r = slot_r + wall;
|
||||
|
||||
// Z locations
|
||||
z0 = 0;
|
||||
z1 = round_stub_len;
|
||||
z2 = round_stub_len + transition_len;
|
||||
z3 = round_stub_len + transition_len + slot_stub_len;
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// HELPERS
|
||||
// ------------------------------------------------------------
|
||||
|
||||
module rounded_rect_2d(w, h, r) {
|
||||
rr = min(r, min(w,h)/2 - 0.01);
|
||||
hull() {
|
||||
translate([-(w/2 - rr), -(h/2 - rr)]) circle(r=rr);
|
||||
translate([ +(w/2 - rr), -(h/2 - rr)]) circle(r=rr);
|
||||
translate([-(w/2 - rr), +(h/2 - rr)]) circle(r=rr);
|
||||
translate([ +(w/2 - rr), +(h/2 - rr)]) circle(r=rr);
|
||||
}
|
||||
}
|
||||
|
||||
module round_profile_3d(d, z, h=1) {
|
||||
translate([0,0,z])
|
||||
linear_extrude(height=h)
|
||||
circle(d=d);
|
||||
}
|
||||
|
||||
module rect_profile_3d(w, h_rect, r, z, h=1) {
|
||||
translate([0,0,z])
|
||||
linear_extrude(height=h)
|
||||
rounded_rect_2d(w, h_rect, r);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// OUTER SHELL
|
||||
// ------------------------------------------------------------
|
||||
|
||||
module outer_shell() {
|
||||
union() {
|
||||
// Straight round collar
|
||||
hull() {
|
||||
round_profile_3d(round_outer_d, z0, 1);
|
||||
round_profile_3d(round_outer_d, z1, 1);
|
||||
}
|
||||
|
||||
// Transition
|
||||
hull() {
|
||||
round_profile_3d(round_outer_d, z1, 1);
|
||||
rect_profile_3d(slot_outer_w, slot_outer_h, slot_outer_r, z2, 1);
|
||||
}
|
||||
|
||||
// Straight rectangular collar
|
||||
hull() {
|
||||
rect_profile_3d(slot_outer_w, slot_outer_h, slot_outer_r, z2, 1);
|
||||
rect_profile_3d(slot_outer_w, slot_outer_h, slot_outer_r, z3, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// INNER VOID
|
||||
// ------------------------------------------------------------
|
||||
|
||||
module inner_void() {
|
||||
union() {
|
||||
// Straight round passage
|
||||
hull() {
|
||||
round_profile_3d(round_inner_d, z0 - 0.2, 1.4);
|
||||
round_profile_3d(round_inner_d, z1 + 0.2, 1.4);
|
||||
}
|
||||
|
||||
// Transition passage
|
||||
hull() {
|
||||
round_profile_3d(round_inner_d, z1 - 0.2, 1.4);
|
||||
rect_profile_3d(slot_w, slot_h, slot_r, z2 + 0.2, 1.4);
|
||||
}
|
||||
|
||||
// Straight rectangular passage
|
||||
hull() {
|
||||
rect_profile_3d(slot_w, slot_h, slot_r, z2 - 0.2, 1.4);
|
||||
rect_profile_3d(slot_w, slot_h, slot_r, z3 + 0.2, 1.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// OPTIONAL ROUND STOP RING
|
||||
// ------------------------------------------------------------
|
||||
|
||||
module round_stop_ring() {
|
||||
if (add_round_stop_ring) {
|
||||
translate([0,0,z0]) {
|
||||
difference() {
|
||||
cylinder(d = round_outer_d + round_stop_ring_extra_od,
|
||||
h = round_stop_ring_len);
|
||||
translate([0,0,-0.2])
|
||||
cylinder(d = round_outer_d,
|
||||
h = round_stop_ring_len + 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// FINAL PART
|
||||
// ------------------------------------------------------------
|
||||
|
||||
union() {
|
||||
difference() {
|
||||
outer_shell();
|
||||
inner_void();
|
||||
}
|
||||
round_stop_ring();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue