include include include include include // ------- VARIABLES BEGIN ------------- // 1 - straight section // 2 - fan section // 3 - blind end section model = 2; fan_down = false; // the direction the fan adapter should be moved in relation to the radiator conn = false; // connecting tabs center_fan_hole = false; // for model 1; an additional hole for a fan // północny kaloryfer w dużym pokoju - 42, 97, 7.5 // południowy kaloryfer w dużym pokoju - 60, 97, 7.5 h = 60; // total height w = 97; // inner width lip = 7.5; // height of lip for radiator overlap l = model != 1 ? 70 : 180; // 18cm for model 1, 7cm for others t = 2; // wall thickness // chamfers ch_top = 6; ch_bottom = 10; // lip chamfer size for radiator support // connecting tab size conn_t = 2; conn_l = 20; // fan adapter settings fan_spec1 = fan80x25; // model 1 fan_spec2 = fan80x25; // model 2 fan_dist = 75; // distance to the main channel body in model 2 fan_width = 85; // model 2 - size of the box containing the fan cutout fan_t = 5; // model 2 - thickness of adapter // ------- VARIABLES END ------------- // main body difference() { up(h/2) cuboid([w+2*t,l,h]); up(h/2 - t) cuboid([w,l+1,h]); if(center_fan_hole && model == 1) {up(h/2) fan_holes(fan_spec1);} } // chamfers union() { difference() { up(h/2) cuboid([w+2*t, l, h]); up(h/2) cuboid([w+2*t, l, h], chamfer=ch_top, edges=[TOP+LEFT,TOP+RIGHT]); } difference() { up(h/2) up(lip/2) cuboid([w+2*t,l,h-lip]); up(h/2) up(lip/2) cuboid([w+2*t,l,h-lip], chamfer=ch_bottom, edges=[BOTTOM+LEFT,BOTTOM+RIGHT]); } } // connector tabs if(conn || model == 1) {fwd(l/2) union() { up(lip) up(h/2) union() { left(w/2 - conn_t/2) cuboid([conn_t,conn_l,h/4]); right(w/2 - conn_t/2) cuboid([conn_t,conn_l,h/4]); } up(h) down(conn_t/2) down(t) cuboid([conn_l, conn_l, conn_t]); }} // blind end if(model == 3) { back(l/2 - t/2) up(h/2) cuboid([w,t,h]);} // fan tmp_h = fan_down ? fan_width - h : 0; if(model == 2) { back(l/2 + fan_dist) up(fan_width/2) down(tmp_h) union() { difference() { cuboid([fan_width, fan_t,fan_width]); xrot(90) fan_holes(fan_spec2); } chain_hull() { up(fan_width/2 - t/2) fwd(fan_t/2) yrot(90) cyl(h=fan_width, d=t); up(tmp_h) down(fan_width/2) up(h - t/2) fwd(fan_dist) yrot(90) cyl(h=w+2*t, d=t); } chain_hull() { down(fan_width/2 - t/2) fwd(fan_t/2) yrot(90) cyl(h=fan_width, d=t); up(tmp_h) down(fan_width/2) up(t/2) fwd(fan_dist) yrot(90) cyl(h=w+2*t, d=t); } chain_hull() { left(fan_width/2 - t/2) fwd(fan_t/2) cyl(h=fan_width, d=t); up(tmp_h) down(fan_width/2) up(h/2) left((w+2*t)/2) right(t/2) fwd(fan_dist) cyl(h=h, d=t); } chain_hull() { right(fan_width/2 - t/2) fwd(fan_t/2) cyl(h=fan_width, d=t); up(tmp_h) down(fan_width/2) up(h/2) right((w+2*t)/2) left(t/2) fwd(fan_dist) cyl(h=h, d=t); } } }