Browse Source

formatting

master
wes 9 months ago
parent
commit
536dbb7f5b
  1. 24
      amp_case.py
  2. 10
      watch_stand.py

24
amp_case.py

@ -28,7 +28,7 @@ panel_distance = 10.5 + (
panel_component_diameter / 2
) # distance between each panel component
panel_dist_from_side = 2
panel_dist_from_bottom = 0 # how far the panel components are from the bottom
panel_dist_from_bottom = 0 # how far the panel components are from the bottom
result = Workplane().box(amp_length, amp_width, middle_width)
@ -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

10
watch_stand.py

@ -25,7 +25,7 @@ band_width = 21
band_diameter = 55
band_radius = band_diameter / 2
first_circle_height = 175 # how tall the horizontal circle part will be
first_circle_height = 175 # how tall the horizontal circle part will be
Workplane = cqmore.extend(Workplane)
Workplane.addSvgPath = addSvgPath
@ -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