// Last edited on 2019-06-28 11:47:17 by jstolfi #include "fume_hood_frame_slab.inc" #include "fume_hood_frame_walls.inc" #macro fume_hood_frame(ct_dim, ctz, dtop, what) // Metalon frame for the fume hood. Assumes that the counter block // (tile, metal frame, etc.) has dimensions {ct_dim} and low corner // at {<0,0,0>}, not counting the support hangouts below {z=0}. The // top counter surface is assumed to be {ctz} millimeters above the // bottom of the frame (not including the plate below it). // The diagonal supports at the top will be included only if {dtop=1}. // If {what=1} returns the object. If {what=0} returns its dimensions // instead. The dimensions ignoreany stuff protruding below {z=0}. #local xp = 0.5*xplode; // Max explosion displacement. #local wd = tube_wd; // Metalon tubes are square with this side. // Total frame dimensions: #local tot_ht = 1900; // Total height of frame including top/bot slabs. #local dim = < ct_dim.x, ct_dim.y + 2*(wd+1), tot_ht >; #if (what=0) #local res = dim; #else // Bottom horizontal slab, positioned, exploded: #local slab_dim = < dim.x, dim.y, wd >; #local slab = object{ fume_hood_frame_slab(slab_dim.x,slab_dim.y, wd,wd, 1) translate -xp*z } // Frame walls minus top and bottom slabs: #local walls_dim = < dim.x, dim.y, dim.z - 2*slab_dim.z >; // Overall dimensions. #local walls = object{ fume_hood_frame_walls(walls_dim,ctz-wd,ct_dim.z, wd, dtop) } #local xp = 0.5*xplode; #local res = union{ object{ slab } object{ walls translate slab_dim.z*z } object{ slab scale <1,1,-1> translate dim.z*z } } #end res #end