base_radius=150; mid_radius=180; top_radius=150; height=600; mink_radius = 15; support_width=base_radius*2+60; support_height=130; debord=30; nb_planches = 5; r_height=height-2*mink_radius; r_base_radius = base_radius - mink_radius; r_mid_radius = mid_radius - mink_radius; r_top_radius = top_radius - mink_radius; *difference() { support(); translate([0,0,30]) #fut(); } for(i=[1:nb_planches]) { translate([i*(support_height+10),0,0]) projection(cut=false) rotate([0,90,0]) difference() { projete_planche("X", i); translate([0,0,30]) fut(); } } rotate([0,0,90]) for(i=[1:nb_planches]) { translate([0,i*(support_height+10),0]) projection(cut=false) rotate([90,0,0]) difference() { projete_planche("Y", i); translate([0,0,30]) fut(); } } module support() { difference() { translate([-support_width/2,-support_width/2,-support_height/2]) { create_planks_2(nb_planches,support_width,support_height, 12,-1,true,true); } } difference() { translate([support_width/2,-support_width/2,-support_height/2]) { rotate([0,0,90]) create_planks_2(nb_planches,support_width,support_height, 12,-1,true,true); } } } module projete_planche(sens, num_planche) { if( sens == "Y" ) { difference() { translate([-support_width/2,-support_width/2,-support_height/2]) { create_planks_2(5,support_width,support_height, 12,num_planche,true,true); } translate([support_width/2,-support_width/2,-support_height/2]) { rotate([0,0,90]) create_planks_2(5,support_width,support_height, 12,-1,true,false); } } } else { difference() { translate([support_width/2,-support_width/2,-support_height/2]) { rotate([0,0,90]) create_planks_2(5,support_width,support_height, 12,num_planche,true,true); } translate([-support_width/2,-support_width/2,-support_height/2]) { create_planks_2(5,support_width,support_height, 12,-1,false,true); } } } } module create_planks(nb, width,height,plank_epais) { dist = (width-plank_epais)/(nb-1); echo("dist : ",dist); for(i=[0:nb-2]) { translate([0,plank_epais+dist*i,0]) { cube([width, dist-plank_epais, height]); } } } module create_planks_2(nb, width,height,plank_epais,draw_only=-1,draw_half_low=true,draw_half_top=true) { dist = (width-plank_epais)/(nb-1); echo("dist : ",dist); hauteur=(draw_half_low && !draw_half_top) ? height/3:(draw_half_top && !draw_half_low) ? height*2/3 : height; decal_haut = (draw_half_top && !(draw_half_low)) ? height/3 : 0; for(i=[0:nb-1]) { if(draw_only==-1 || draw_only==i+1) { translate([0,dist*i,decal_haut]) { cube([width, plank_epais, hauteur]); translate([-debord,0,0]) cube([debord,plank_epais,hauteur]); translate([width,0,0]) cube([debord,plank_epais,hauteur]); } } } } module fut() { rotate_extrude() { difference() { minkowski() { polygon(points=[[0,0],[r_base_radius,0],[r_mid_radius,r_height/2],[r_top_radius,r_height],[0,r_height]],paths=[[0,1,2,3,4]]); circle($fn=24,r=mink_radius); } translate([-mink_radius,-mink_radius]) square([mink_radius,height]); } } }