Browse Source

formatting

master
wes 9 months ago
parent
commit
536dbb7f5b
  1. 22
      amp_case.py
  2. 8
      watch_stand.py

22
amp_case.py

@ -45,7 +45,7 @@ result = (
.center(0, amp_width / 2)
.box(amp_length, amp_width + bottom_width, bottom_width)
.workplane(offset=-10)
.move(-(amp_width/2), 0)
.move(-(amp_width / 2), 0)
.box(10, 10, 10, combine="cut")
)
@ -53,7 +53,8 @@ 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)
.faces("+Z")
.chamfer(0.9, 1)
)
panel_holes = (
@ -77,11 +78,17 @@ panel_holes_2 = (
result = result.cut(panel_holes)
result = result.cut(panel_holes_2)
result = (
result.workplane()
.line(0, amp_width, forConstruction=True)
.vertices()
.cylinder(3, 5)
)
back = (
result
.workplane(offset=-6.3)
result.workplane(offset=-6.3)
.center(-(amp_width) + 2, 0)
.box(panel_width*2.5, amp_width + side_width, amp_height + 2.5)
.box(panel_width * 2.5, amp_width + side_width, amp_height + 2.5)
)
back_screws = (
@ -94,7 +101,7 @@ back_screws = (
)
back = back.cut(back_screws)
back = back.center(31.5, 0).box(amp_width, amp_width+9, amp_width, combine="cut")
back = back.center(31.5, 0).box(amp_width, amp_width + 9, amp_width, combine="cut")
result = result.cut(back_screws)
@ -102,6 +109,7 @@ 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(back)
# show_object(back)
show_object(result)
except NameError:
pass

8
watch_stand.py

@ -54,14 +54,14 @@ stand_base = (
.threadedHole(screw, 34, simple=simple, fit="Loose")
)
stand_base = stand_base.faces(">X[0]").sphere(base_radius*1.5)
stand_base = stand_base.workplane(offset=base_radius*2).box(
stand_base = stand_base.faces(">X[0]").sphere(base_radius * 1.5)
stand_base = stand_base.workplane(offset=base_radius * 2).box(
base_diameter * 2, base_radius * 3, base_radius * 3, combine="cut"
)
stand_base = (
stand_base.workplane(offset=base_radius - 5)
.rect(base_radius*1.5, base_radius*1.5, forConstruction=True)
.rect(base_radius * 1.5, base_radius * 1.5, forConstruction=True)
.vertices()
.cylinder(9, 6, combine="cut")
)
@ -115,6 +115,6 @@ cq.exporters.export(holder_part, "/home/deck/model_files/watch_stand_holder.step
try:
show_object(stand_base)
# show_object(cut_polygon)
#show_object(holder_part)
# show_object(holder_part)
except NameError:
pass

Loading…
Cancel
Save