import cadquery as cq from cadquery import exporters p_innerWidth = 27.0 # Outer width of box enclosure p_innerLength = 51.0 # Outer length of box enclosure p_innerHeight = 20 # Outer height of box enclosure p_thickness = 1.0 # Thickness of the box walls p_bottomHeight = 3 p_boardThickness = 1 p_screwpostSpacing = [20.4, 44.4] p_screwpostID = 3.5 p_screwpostOD = 5 p_innerScrewpostOD = 6.25 p_screwLength = 12.0 p_countersinkDiameter = 5.75 p_hexnutDiameter = 6.5 p_hexnutDepth = 2.5 p_wireOpening = [15, 6] countersinkDepth = (p_innerHeight + p_thickness * 2) - p_screwLength enclosed = ( cq.Workplane("XY") .rect(p_innerWidth, p_innerLength) .extrude(p_innerHeight) ) # split box into lid and bottom parts (bottom, lid) = ( enclosed.shell(p_thickness) .faces("Z").workplane() .rect(*p_screwpostSpacing, forConstruction=True) .vertices().tag("screw_holes") .circle(p_countersinkDiameter / 2.0 + p_thickness) .extrude(-(countersinkDepth + p_thickness)) .vertices(tag="screw_holes") .cboreHole(p_screwpostID, p_countersinkDiameter, countersinkDepth) ) lid = ( lid.faces(">Y").edges("