Browse Source

back, chamfer

master
wes 9 months ago
parent
commit
21582ddc62
  1. 30
      amp_case.py

30
amp_case.py

@ -14,7 +14,7 @@ from math import ceil, floor
side_width = 5
bottom_width = 5
middle_width = 2
panel_width = 1.2
panel_width = 0.8
amp_bottom_height = 19 + bottom_width + middle_width # how tall the pcb is
battery_width = 26
@ -44,12 +44,16 @@ result = (
result.workplane(offset=amp_height / 2)
.center(0, amp_width / 2)
.box(amp_length, amp_width + bottom_width, bottom_width)
.workplane(offset=-10)
.move(-(amp_width/2), 0)
.box(10, 10, 10, combine="cut")
)
result = (
result.workplane(offset=-7.8)
.center((amp_width / 2) - (panel_width / 2) - 1, 0)
.box(panel_width, amp_width, amp_height)
.faces("+Z").chamfer(0.9, 1)
)
panel_holes = (
@ -73,9 +77,31 @@ panel_holes_2 = (
result = result.cut(panel_holes)
result = result.cut(panel_holes_2)
back = (
result
.workplane(offset=-6.3)
.center(-(amp_width) + 2, 0)
.box(panel_width*2.5, amp_width + side_width, amp_height + 2.5)
)
back_screws = (
Workplane("ZY")
.workplane(offset=(amp_length / 2))
.center(2, 0.0)
.rect(37, amp_width, forConstruction=True)
.vertices()
.cylinder(10, 0.8)
)
back = back.cut(back_screws)
back = back.center(31.5, 0).box(amp_width, amp_width+9, amp_width, combine="cut")
result = result.cut(back_screws)
cq.exporters.export(result, "/home/deck/model_files/amp_case.step")
cq.exporters.export(back, "/home/deck/model_files/amp_case_back.step")
try:
show_object(result)
show_object(back)
except NameError:
pass

Loading…
Cancel
Save