//Last edited on 2019-12-11 00:03:33 by jstolfi #include "compute_shelf_heights.inc" #include "double_closet.inc" #macro SE_double_closet ( shf_open, tagg, what, isd, ishf, dim_only ) // If {shf_open} is true, shows doors open to the maximum extent. // Externally fixed parameters: #local space_dim = < 450, 2100, 1300 >; // Space for closet. #local handle_dim = < 2.0, 60.0, 25.0 >; // Recessed handle // Closet parameters: #local closet_dim = < 400, 2000, 1200 >; // Dimensions of closet (excl. handles). // Closet enclosure parameters: #local walls_side_th = 10.5; // Thickness of left and right closet walls. #local walls_rear_th, walls_face_th = 10.5; // Thickness of rear closet wall. #local walls_face_th = 10.5; // Thickness of front closet wall (doors). #local walls_bot_th = 10.5; // Thickness of bottom closet wall. #local walls_top_th = 10.5; // Thickness of top closet wall // Shelf parameters: #local shf_face_th = 10.5; // Thickness of shelf face plate. #local shf_bot_th = 10.5; // Thickness of shelf bottom plate. // Shelf heights: #local shf_tot_ht = closet_dim.z - walls_bot_th - ??? - ??? - walls_top_th; #local shf_min_cont_ht = 120; // Min height of useful space inside shelf. #local shf_min_ht = shf_min_cont_ht + shf_bot_th; // Min shelf height. #local shf_bot_ht = 300; // Height of bottom shelf in few-shelfs closet. #local shf_N = 5; // Number of shelves. #local shf_ht = array[shf_N]; #local shf_ht = compute_shelf_heights(shf_N, 1, shf_tot_ht, shf_min_ht, shf_bot_ht) // Shelf heights for all closets: #local shf_ht = array[shf_N] #local max_open = #if (shf_open) 90; #else 0; #end #include "wshop_shelf_textures.inc" #local tx_walls_in = texture{ tx_wood } #local tx_walls_out = texture_epoxy(< 0.000, 0.100, 1.000 >) #local tx_shelf = texture_epoxy(< 1.000, 0.800, 0.000 >) #local tx_handle = texture_brushed_metal(< 0.050, 0.050, 0.050 >) #local res = object{ double_closet ( space_dim, shf_N, shf_ht, handle_dim, walls_side_th, walls_rear_th, walls_face_th, walls_face_th, walls_bot_th, walls_top_th, shf_face_th, shf_bot_th, max_open, tx_walls_in, tx_walls_out, tx_shelf, tx_handle, tx_rail, tagg, what, isd, ishf, dim_only ) } res #end