Browse Source

add hole for speaker

master
wes 1 month ago
parent
commit
f4591a2188
  1. 34
      carlson_amp_enclosure.py

34
carlson_amp_enclosure.py

@ -17,9 +17,9 @@ Workplane.addSvgPath = addSvgPath
screw_simple = True # Controls whether to not actually make the screw threads, saves time running it for testing
screw_length = 10
top_screw = ButtonHeadScrew(
size="M3-0.5",
fastener_type="iso7380_1",
top_screw = CounterSunkScrew(
size="M2.5-0.45",
fastener_type="iso7046",
length=screw_length * MM,
simple=screw_simple,
)
@ -79,12 +79,12 @@ top = top.workplane(offset=-0.8).box(
top = (
top.faces(">Z[3]")
.rect(
box_length - 5.5,
box_width - 5.5,
box_length - 6.5,
box_width - 6.5,
forConstruction=True,
)
.vertices()
.cboreHole(2.0, 3.0, 1.1)
.cboreHole(2.9, 3.5, 1.1)
)
speaker_length = (
@ -102,12 +102,30 @@ top = (
.move(speaker_length / 2.0, 0)
.cylinder(5, speaker_width / 2.0, combine="cut")
)
top = (
top.workplane()
.move(-(speaker_length / 2.0), 0)
.cylinder(5, speaker_width / 2.0, combine="cut")
)
top = top.workplane(offset=1).box(10, 20.8, 3.0, combine="cut")
top = (
top.workplane(offset=1).move(10.5 / 2.0, 0).cylinder(3.0, 20.8 / 2.0, combine="cut")
)
top = (
top.workplane(offset=1)
.move(-(10.5 / 2.0), 0)
.cylinder(3.0, 20.8 / 2.0, combine="cut")
)
for i in range(0, 11, 2):
top = top.workplane(offset=-0.69).move(i, 0).box(0.8, 15, 0.4)
for i in range(0, 11, 2):
top = top.workplane(offset=-0.69).move(-i, 0).box(0.8, 15, 0.4)
bottom = result.workplane(offset=(box_height / 2) - 2).split(keepBottom=True)
@ -117,14 +135,14 @@ bottom = bottom.workplane(offset=box_height + 5).box(
bottom = (
bottom.workplane(offset=(box_height / 2) - 9)
.rect(box_length - 5.5, box_width - 5.5)
.rect(box_length - 6.5, box_width - 6.5)
.vertices()
.cylinder(box_height - wall_thickness * 1.5, 2.5)
)
bottom = (
bottom.workplane(offset=(box_height / 2) + 4.0)
.rect(box_length - 5.5, box_width - 5.5)
.rect(box_length - 6.5, box_width - 6.5)
.vertices()
.threadedHole(top_screw, 10, simple=screw_simple, fit="Close", counterSunk=False)
)

Loading…
Cancel
Save