// Last edited on 2021-04-05 02:37:33 by jstolfi #include "compost_bin_stage_side.inc" #include "compost_bin_stage_back.inc" #include "compost_bin_stage_peg.inc" #include "compost_bin_base_front.inc" #include "compost_bin_base.inc" #include "compost_bin_stage.inc" // Wood texture: #declare tx_plywd = texture_wood( < 1.000, 0.950, 0.600 >, < 0.700, 0.550, 0.400 >, 0.2 ) // Wood texture: #declare tx_wbeam = texture_wood( < 1.000, 0.900, 0.400 >, < 0.700, 0.550, 0.400 >, 0.2 ) #macro compost_bin( tagg ) // A compost_bin. // {tagg} Prefix for piece names. // The lower corner is at the origin. // Outer stage: #local nb = 2; // Number of stage stages. #local wood_th = 15; // Wood thickness. #local base_dim = < 600, 800, 800 >; // Base size. #local stage_dim = < base_dim.x, base_dim.y, 300 >; // Stage stage size. #local obj = union{ #local tagg_base = concat( tagg, ".BA" ) object{ compost_bin_base( tagg_base, base_dim, wood_th ) } #local k = 0; #while (k < nb) #local tagg_stage = concat( tagg, ".S", str( k,0,0 ) ) object{ compost_bin_stage( tagg_stage, stage_dim, wood_th ) translate (base_dim.z + k*stage_dim.z)*z translate xplode*100*(k+1)*z } #local k = k + 1; #end } obj #end