include include include include include // 1 - straight section // 2 - fan section // 3 - blind end section model = 1; fan_down = false; conn = true; center_fan_hole = true; // północny kaloryfer w dużym pokoju - 42, 97, 7.5 h = 60; // total height w = 97; // górna kratka na kaloryferze lip = 7.5; l = model != 1 ? 70 : 180; // 18cm druk, 5cm adapter do wiatraka t = 2; fan_t = 5; ch_top = 6; ch_bottom = 10; conn_t = 2; conn_l = 20; fan_dist = 75; fan_width = 85; fan_t = 5; // 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(fan80x25);} } // 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(fan80x25); } 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); } } }