|
|
@ -11,6 +11,13 @@ import cadquery as cq |
|
|
|
import cqmore |
|
|
|
from math import ceil, floor |
|
|
|
|
|
|
|
Workplane = cqmore.extend(Workplane) |
|
|
|
Workplane.addSvgPath = addSvgPath |
|
|
|
|
|
|
|
headphone_paths, headphone_attributes = svg2paths( |
|
|
|
"/home/deck/cad_files/svgs/headphones.svg" |
|
|
|
) |
|
|
|
|
|
|
|
side_width = 5 |
|
|
|
bottom_width = 5 |
|
|
|
middle_width = 2 |
|
|
@ -57,6 +64,24 @@ result = ( |
|
|
|
.box(panel_width, amp_width + 5, amp_height + 2.5) |
|
|
|
) |
|
|
|
|
|
|
|
in_text = ( |
|
|
|
Workplane("YZ") |
|
|
|
.workplane(offset=(amp_width / 2) - 3.5) |
|
|
|
.center(-15, -2) |
|
|
|
.text("IN", 4, 1) |
|
|
|
.rotateAboutCenter((1, 0, 0), 180) |
|
|
|
) |
|
|
|
out_text = ( |
|
|
|
Workplane("YZ") |
|
|
|
.workplane(offset=(amp_width / 2) - 3.5) |
|
|
|
.center(15, -2) |
|
|
|
.text("OUT", 4, 1) |
|
|
|
.rotateAboutCenter((1, 0, 0), 180) |
|
|
|
) |
|
|
|
|
|
|
|
result = result.cut(in_text) |
|
|
|
result = result.cut(out_text) |
|
|
|
|
|
|
|
panel_holes = ( |
|
|
|
Workplane("ZY") |
|
|
|
.workplane(offset=-(amp_length / 2)) |
|
|
@ -117,6 +142,7 @@ cq.exporters.export(back, "/home/deck/model_files/amp_case_back.step") |
|
|
|
|
|
|
|
try: |
|
|
|
# show_object(back) |
|
|
|
# show_object(front_text) |
|
|
|
show_object(result) |
|
|
|
except NameError: |
|
|
|
pass |
|
|
|