49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
import os
|
|
import importlib as ir
|
|
from cadquery import exporters as et
|
|
root_dir = r'C:\\Users\\Ishan\\Seafile\\Designs\\Projects\\kickdrawers\\cadfree\\code'
|
|
os.chdir(root_dir)
|
|
|
|
import items as it
|
|
import util as u
|
|
import cadquery as cq
|
|
ir.reload(it)
|
|
ir.reload(u)
|
|
|
|
|
|
print('hello')
|
|
|
|
objs = list()
|
|
|
|
# Base parameters
|
|
add_the_fingers = False
|
|
force_tab_width = False
|
|
r_hole = 4.6/2
|
|
full_width = 1012
|
|
slider_thickness = 14
|
|
t_small = 3.175
|
|
t_large = t_small*2
|
|
back_padding = 14
|
|
box_depth = 540 + 25.4/2
|
|
box_height = 3.15*25.4
|
|
prefix = 'orig'
|
|
|
|
# Computed parameters
|
|
box_depth_w_pad = box_depth + back_padding
|
|
box_width = (full_width - 4*slider_thickness - 2*t_large - 2*t_small)/2
|
|
z_drop = t_large + t_small
|
|
settings = {'w':box_width, 'd':box_depth, 'h':box_height, 't_large':t_large, 'add_holes':True, 'r_hole':r_hole, 'add_fingers':add_the_fingers}
|
|
|
|
|
|
|
|
|
|
# Make drawers
|
|
drawer_1 = it.create_drawer(**settings ).add_tag('drawer_1');
|
|
drawer_2 = it.create_drawer( **settings).translate(box_width+2*slider_thickness+2*t_small,0,0).add_tag('drawer_2');
|
|
|
|
|
|
objs.append(drawer_1)
|
|
for x in objs:
|
|
for o in x:
|
|
show_object(o)
|