Skip to content

Commit 0c158ef

Browse files
committed
Added new option, radius on fins
- with cd_ra a radius can be set on the bottom of the fins. Feature contributed by Jannik (Printables.com @Jannik_1168474)
1 parent 28f7591 commit 0c158ef

1 file changed

Lines changed: 58 additions & 12 deletions

File tree

customizable_cable_duct.scad

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@
2222
* https://www.dream-dimensions.de
2323
* https://www.printables.com/model/20033-customizable-cable-duct
2424
*
25-
* Version: 1.2 (2022-05-22)
2625
*
2726
* 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+
*
2832
* ## v1.3 (2024-10-06)
2933
* ### Added (by CrazyRaph)
3034
* - option added for cover with edge, to prevent shifting
@@ -75,6 +79,9 @@ cd_shell = 1.2;
7579
cd_cover_equalwidth = 0; // [0:false, 1:true]
7680
// Remark: since this setting is also used for the length, cd_cover_equalsize would be more appropriate
7781

82+
// Radius on fins (0 for none)
83+
cd_ra = 2;
84+
7885
// Create edge on cover to prevent shifting
7986
cd_cover_edge = "none"; // [one:one side closed,both:both sides closed,none: both sides open]
8087
//Resize the fins on one or both sides to make space for the recess
@@ -197,13 +204,23 @@ module inner_duct_profile()
197204
{
198205
cd_hwidth = cd_width/2;
199206
depth_factor = cd_cover_equalwidth ? 2 : 1;
200-
207+
difference(){
201208
polygon([[cd_hwidth-depth_factor*mf_depth-cd_shell, cd_height+s],
202209
[cd_hwidth-depth_factor*mf_depth-cd_shell, cd_height-mf_length-mf_top_offset],
203210
[cd_hwidth-cd_shell, cd_height-mf_length-mf_top_offset-depth_factor*mf_depth*tan(45)],
204211
[cd_hwidth-cd_shell, cd_shell],
205212
[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+
}
207224
}
208225

209226
/*
@@ -290,19 +307,48 @@ module create_duct()
290307
{
291308
color(col)
292309
rotate(90, [1, 0, 0])
293-
difference() {
310+
311+
difference() {//difference
294312
// extrude the duct profile
295313
linear_extrude(height=cd_length, center=false)
296314
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
300316
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+
306352
// mounting hole cylinders
307353
if (cd_hole_count > 1)
308354
{

0 commit comments

Comments
 (0)