|
|
@ -14,7 +14,7 @@ from math import ceil, floor |
|
|
|
Workplane = cqmore.extend(Workplane) |
|
|
|
Workplane.addSvgPath = addSvgPath |
|
|
|
|
|
|
|
screw_simple = False # Controls whether to not actually make the screw threads, saves time running it for testing |
|
|
|
screw_simple = True # Controls whether to not actually make the screw threads, saves time running it for testing |
|
|
|
|
|
|
|
screw_length = 10 |
|
|
|
top_screw = ButtonHeadScrew( |
|
|
@ -87,6 +87,27 @@ top = ( |
|
|
|
.cboreHole(2.0, 3.0, 1.1) |
|
|
|
) |
|
|
|
|
|
|
|
speaker_length = ( |
|
|
|
30 - 2.75 - 15 - 2 |
|
|
|
) # 15 is half of the length, 2 is for the cylinders being cut |
|
|
|
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.workplane() |
|
|
|
.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") |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
bottom = result.workplane(offset=(box_height / 2) - 2).split(keepBottom=True) |
|
|
|
|
|
|
@ -176,6 +197,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 |
|
|
|