import cadquery as cq # from cq_warehouse.drafting import Draft import components.audio_plug as audio_plug import components.battery_holder as battery_holder import components.hdmi_out as hdmi_out import components.keyboard as keyboard import components.screen_pillars as screen_pillars import components.usb_hub as usb_hub import components.zero_holder as cpu_holder import dimensions as dim from utils import export # Base for the notebook. Basically a kbd base that extends back # as much as possible screen_pillars.init(dim.mounting_pillar_positions, dim.base_thickness - dim.shell_t) def model(): # Create the basic shape of the case bottom. model = ( cq.Workplane("XY") .workplane(offset=dim.base_thickness / 2) .tag("mid_height") # Hollow box .box(dim.width, dim.height, dim.base_thickness) .edges("|Z") .fillet(2) .faces(">Z") .shell(-dim.shell_t) ) # Now the basic box shape is in place, start adding things # and cutting holes. model = usb_hub.add( model=model, width=dim.width, height=dim.height, thickness=dim.base_thickness, bottom_face="