diff --git a/amp_case.py b/amp_case.py index f5c3a4b..c0a4189 100644 --- a/amp_case.py +++ b/amp_case.py @@ -14,14 +14,14 @@ from math import ceil, floor Workplane = cqmore.extend(Workplane) Workplane.addSvgPath = addSvgPath -headphone_paths, headphone_attributes = svg2paths( +headphone_path, headphone_attribute = svg2paths( "/home/deck/cad_files/svgs/headphones.svg" ) side_width = 5 bottom_width = 5 middle_width = 2 -panel_width = 0.8 +panel_width = 1.1 amp_bottom_height = 19 + bottom_width + middle_width # how tall the pcb is battery_width = 26 @@ -68,19 +68,31 @@ in_text = ( Workplane("YZ") .workplane(offset=(amp_width / 2) - 3.5) .center(-15, -2) - .text("IN", 4, 1) + .text("IN", 5, 1) .rotateAboutCenter((1, 0, 0), 180) ) + out_text = ( Workplane("YZ") .workplane(offset=(amp_width / 2) - 3.5) .center(15, -2) - .text("OUT", 4, 1) + .text("OUT", 5, 1) .rotateAboutCenter((1, 0, 0), 180) ) +icon = ( + Workplane("YZ") + .workplane(offset=171.5) + .center(-50, -100) + .addSvgPath(headphone_path[0]) + .extrude(4) + .val() + .scale(0.16) +) + result = result.cut(in_text) result = result.cut(out_text) +result = result.cut(icon) panel_holes = ( Workplane("ZY") @@ -137,6 +149,12 @@ result = ( result = result.cut(back_screws) +result = ( + result.workplane(offset=-(amp_height / 2) + 3) + .center(amp_length - 10.5, amp_width / 2) + .box(amp_length - 9, 2, (amp_height / 2)) +) + cq.exporters.export(result, "/home/deck/model_files/amp_case.step") cq.exporters.export(back, "/home/deck/model_files/amp_case_back.step")