// Last edited on 2021-04-05 02:38:49 by jstolfi #macro compost_bin_base_front( tagg, sy, sz, shelf_z, shelf_my, ramp_z, ramp_my, wood_th ) // The front panel of the 'base' section. // {tagg} Prefix for piece names. // {sy} Width (Y size) of base section. // {sz} Height (Z size) of base section. // {shelf_z} Z-coord of bottom surf of shelf inside base. // {shelf_my} Y-width of frame on each side of shelf opening. // {ramp_z} Z-coord of bottom surf of ramp at front surf of base. // {ramp_my} Y-width of frame on each side of ramp opening. // {wood_th} Thickness of each layer of seat. // In spite of the name, the panel is positioned as if it were the // *back* panel: with lower corner at origin, front surface at {X = // 0}. Must be mirrored in {X} and displaced to proper {X} coord. #local ramp_hole_sy = sy - 2*ramp_my; // Y-size of ramp opening. #local ramp_hole_sz = 100; // Z-size of ramp opening. #local shelf_hole_mz = 100; // Z-size of frame above shelf opening. #local shelf_hole_sy = sy - 2*shelf_my; // Y-size of shelf opening. #local shelf_hole_sz = ramp_z - shelf_hole_mz - shelf_z; // Z-size of shelf opening. write_pieces("plywd", tagg, 1, sy,sz,wood_th, "front wall of base") // !!! Should add protrusions for rabetting. !!! #local front = difference{ box{ < 0, wood_th, 0 > + eps3, < wood_th, sy - wood_th, sz > - eps3 } // Shelf opening: box{ < 0, 0, 0 > - eps3, < wood_th, shelf_hole_sy, shelf_hole_sz > + eps3 translate < 0, shelf_my, shelf_z > } // Ramp opening: box{ < 0, 0, 0 > - eps3, < wood_th, ramp_hole_sy, ramp_hole_sz > + eps3 translate < 0, ramp_my, ramp_z > } texture{ tx_plywd rotate 90*y rotate 90*z } } front #end