|
|
@ -14,7 +14,7 @@ from math import ceil, floor |
|
|
|
Workplane = cqmore.extend(Workplane) |
|
|
|
Workplane.addSvgPath = addSvgPath |
|
|
|
|
|
|
|
screw_simple = True # Controls whether to not actually make the screw threads, saves time running it for testing |
|
|
|
screw_simple = False # Controls whether to not actually make the screw threads, saves time running it for testing |
|
|
|
|
|
|
|
pot_diameter = 6.9 |
|
|
|
pot_radius = pot_diameter / 2.0 |
|
|
@ -77,23 +77,23 @@ result = ( |
|
|
|
|
|
|
|
top = result.workplane(offset=(box_height / 2) - 2).split(keepTop=True) |
|
|
|
|
|
|
|
top = top.workplane(offset=-1.5).box( |
|
|
|
box_length + wall_thickness, box_width + wall_thickness, 2, combine="cut" |
|
|
|
top = top.workplane(offset=-2.6).box( |
|
|
|
box_length + wall_thickness - 2, box_width + wall_thickness - 2, 2, combine="cut" |
|
|
|
) |
|
|
|
|
|
|
|
top = top.workplane(offset=-0.8).box( |
|
|
|
top = top.workplane(offset=-1.7).box( |
|
|
|
box_length - wall_thickness - 0.05, box_width - wall_thickness - 0.05, 1 |
|
|
|
) |
|
|
|
|
|
|
|
top = ( |
|
|
|
top.faces(">Z[3]") |
|
|
|
top.faces(">Z[4]") |
|
|
|
.rect( |
|
|
|
box_length - 6.5, |
|
|
|
box_width - 6.5, |
|
|
|
forConstruction=True, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.cboreHole(2.9, 3.5, 1.1) |
|
|
|
.cboreHole(2.9, 3.5, 4.1) |
|
|
|
) |
|
|
|
|
|
|
|
speaker_length = ( |
|
|
@ -102,8 +102,10 @@ speaker_length = ( |
|
|
|
speaker_width = 14.5 - 2.75 |
|
|
|
speaker_thickness = 5 |
|
|
|
|
|
|
|
top = top.faces(">Z[0]").box( |
|
|
|
speaker_length, speaker_width, speaker_thickness, combine="cut" |
|
|
|
top = ( |
|
|
|
top.faces(">Z[0]") |
|
|
|
.workplane(offset=-1) |
|
|
|
.box(speaker_length, speaker_width, speaker_thickness, combine="cut") |
|
|
|
) |
|
|
|
|
|
|
|
top = ( |
|
|
@ -131,10 +133,10 @@ top = ( |
|
|
|
) |
|
|
|
|
|
|
|
for i in range(0, 11, 2): |
|
|
|
top = top.workplane(offset=-0.69).move(i, 0).box(0.8, 15, 0.4) |
|
|
|
top = top.workplane(offset=-0.9).move(i, 0).box(1.0, 15, 0.8) |
|
|
|
|
|
|
|
for i in range(0, 11, 2): |
|
|
|
top = top.workplane(offset=-0.69).move(-i, 0).box(0.8, 15, 0.4) |
|
|
|
top = top.workplane(offset=-0.9).move(-i, 0).box(1.0, 15, 0.8) |
|
|
|
|
|
|
|
bottom = result.workplane(offset=(box_height / 2) - 2).split(keepBottom=True) |
|
|
|
|
|
|
@ -150,7 +152,7 @@ bottom = ( |
|
|
|
) |
|
|
|
|
|
|
|
bottom = ( |
|
|
|
bottom.workplane(offset=(box_height / 2) + 3.5) |
|
|
|
bottom.workplane(offset=(box_height / 2) + 3.6) |
|
|
|
.rect(box_length - 6.5, box_width - 6.5) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, 10, simple=screw_simple, fit="Close", counterSunk=False) |
|
|
@ -256,6 +258,6 @@ cq.exporters.export(bottom, "/home/deck/model_files/carlon_probe_amp_enclosure_b |
|
|
|
cq.exporters.export(top, "/home/deck/model_files/carlon_probe_amp_enclosure_lid.stl") |
|
|
|
|
|
|
|
try: |
|
|
|
show_object(bottom) |
|
|
|
show_object(top) |
|
|
|
except NameError: |
|
|
|
pass |
|
|
|