|
22 | 22 | * https://www.dream-dimensions.de |
23 | 23 | * https://www.printables.com/model/20033-customizable-cable-duct |
24 | 24 | * |
25 | | - * Version: 1.2 (2022-05-22) |
26 | 25 | * |
27 | 26 | * ChangeLog: |
| 27 | + * |
| 28 | + * ## v1.4 (2025-06-15) |
| 29 | + * ### Added (by Jannik) |
| 30 | + * - option to add radius to the bottom of the fins added (cd_ra) |
| 31 | + * |
28 | 32 | * ## v1.3 (2024-10-06) |
29 | 33 | * ### Added (by CrazyRaph) |
30 | 34 | * - option added for cover with edge, to prevent shifting |
@@ -75,6 +79,9 @@ cd_shell = 1.2; |
75 | 79 | cd_cover_equalwidth = 0; // [0:false, 1:true] |
76 | 80 | // Remark: since this setting is also used for the length, cd_cover_equalsize would be more appropriate |
77 | 81 |
|
| 82 | +// Radius on fins (0 for none) |
| 83 | +cd_ra = 2; |
| 84 | + |
78 | 85 | // Create edge on cover to prevent shifting |
79 | 86 | cd_cover_edge = "none"; // [one:one side closed,both:both sides closed,none: both sides open] |
80 | 87 | //Resize the fins on one or both sides to make space for the recess |
@@ -197,13 +204,23 @@ module inner_duct_profile() |
197 | 204 | { |
198 | 205 | cd_hwidth = cd_width/2; |
199 | 206 | depth_factor = cd_cover_equalwidth ? 2 : 1; |
200 | | - |
| 207 | + difference(){ |
201 | 208 | polygon([[cd_hwidth-depth_factor*mf_depth-cd_shell, cd_height+s], |
202 | 209 | [cd_hwidth-depth_factor*mf_depth-cd_shell, cd_height-mf_length-mf_top_offset], |
203 | 210 | [cd_hwidth-cd_shell, cd_height-mf_length-mf_top_offset-depth_factor*mf_depth*tan(45)], |
204 | 211 | [cd_hwidth-cd_shell, cd_shell], |
205 | 212 | [0, cd_shell], |
206 | | - [0, cd_height+s]]); |
| 213 | + [0, cd_height+s] |
| 214 | + ]); |
| 215 | + difference() { |
| 216 | + cd_hwidth = cd_width/2; |
| 217 | + depth_factor = cd_cover_equalwidth ? 2 : 1; |
| 218 | + translate([cd_hwidth-cd_shell, cd_shell]) // place a champfer |
| 219 | + difference() { |
| 220 | + rotate([0, 0, 45]) square([cd_shell, cd_shell], center=true); |
| 221 | + } |
| 222 | + } |
| 223 | + } |
207 | 224 | } |
208 | 225 |
|
209 | 226 | /* |
@@ -290,19 +307,48 @@ module create_duct() |
290 | 307 | { |
291 | 308 | color(col) |
292 | 309 | rotate(90, [1, 0, 0]) |
293 | | - difference() { |
| 310 | + |
| 311 | + difference() {//difference |
294 | 312 | // extrude the duct profile |
295 | 313 | linear_extrude(height=cd_length, center=false) |
296 | 314 | create_duct_profile(); |
297 | | - |
298 | | - // create a series of boxes to cut through the extruded profile |
299 | | - // also subtract cylinder of mounting holes |
| 315 | + //add box and other mountig hole |
300 | 316 | union() { |
301 | | - // boxes |
302 | | - for (i = [0:cd_fins-1]) { |
303 | | - translate([-cd_width/2-1, 3*cd_shell, i*cd_fin_spacing+cd_fin_width+((cd_fins_resize && cd_cover_equalwidth && cd_cover_edge != "none")?cd_shell:0)]) |
304 | | - cube([cd_width+2, cd_height+1, cd_fin_spacing-cd_fin_width]); |
305 | | - } |
| 317 | + difference() { |
| 318 | + // boxes |
| 319 | + for (i = [0:cd_fins-1]) { |
| 320 | + difference() { |
| 321 | + translate([-cd_width/2-1, 3*cd_shell, i*cd_fin_spacing+cd_fin_width+((cd_fins_resize && cd_cover_equalwidth && cd_cover_edge != "none")?cd_shell:0)]) |
| 322 | + cube([cd_width+2, cd_height+1, cd_fin_spacing-cd_fin_width]); |
| 323 | + //radius in box, if greater 0 |
| 324 | + if (cd_ra > 0) { |
| 325 | + //move form origin to box |
| 326 | + translate([0, (3*cd_shell)+cd_ra-s, (i*cd_fin_spacing+cd_fin_width)+(cd_ra)]) |
| 327 | + //connecting the two parts |
| 328 | + union() { |
| 329 | + //Creation of the negative circular segment |
| 330 | + difference() { |
| 331 | + translate([0,-cd_ra/2,-cd_ra/2]) |
| 332 | + cube([cd_width+3,cd_ra,cd_ra],center = true); |
| 333 | + rotate([0,90,0]) |
| 334 | + cylinder(h=cd_width+4,r=cd_ra, center=true, $fn=60); |
| 335 | + } |
| 336 | + translate([0,0,cd_fin_spacing-cd_fin_width-cd_ra-cd_ra]) |
| 337 | + mirror([0, 0, 1]) { |
| 338 | + //Creation of the negative circular segment |
| 339 | + difference(){ |
| 340 | + translate([0,-cd_ra/2,-cd_ra/2]) |
| 341 | + cube([cd_width+3,cd_ra,cd_ra],center = true); |
| 342 | + rotate([0,90,0]) |
| 343 | + cylinder(h=cd_width+4,r=cd_ra, center=true, $fn=60); |
| 344 | + } |
| 345 | + } |
| 346 | + } |
| 347 | + } |
| 348 | + } |
| 349 | + } |
| 350 | + } |
| 351 | + |
306 | 352 | // mounting hole cylinders |
307 | 353 | if (cd_hole_count > 1) |
308 | 354 | { |
|
0 commit comments