|
|
@ -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 |
|
|
@ -33,6 +33,13 @@ top_screw = CounterSunkScrew( |
|
|
|
simple=screw_simple, |
|
|
|
) |
|
|
|
|
|
|
|
battery_screw = CounterSunkScrew( |
|
|
|
size="M3.5-0.6", |
|
|
|
fastener_type="iso7046", |
|
|
|
length=screw_length * MM, |
|
|
|
simple=screw_simple, |
|
|
|
) |
|
|
|
|
|
|
|
x_board_size = 36.07 |
|
|
|
y_board_size = 28.75 |
|
|
|
|
|
|
@ -161,47 +168,51 @@ bottom = ( |
|
|
|
battery_holder_offset_factor = 6.5 |
|
|
|
|
|
|
|
bottom = ( |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 8.9) |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 9.8) |
|
|
|
.move(box_length / 2.0 - wall_thickness * battery_holder_offset_factor, 0) |
|
|
|
.box(battery_holder_slot_width, battery_holder_slot_length, 4.0) |
|
|
|
.box(battery_holder_slot_width, battery_holder_slot_length, 6.0) |
|
|
|
) |
|
|
|
|
|
|
|
bottom = ( |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 9.0) |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 10.0) |
|
|
|
.move( |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 24.0, |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 25.5, |
|
|
|
-(battery_holder_slot_length / 6.5), |
|
|
|
) |
|
|
|
.vLine(battery_holder_hole_dist) |
|
|
|
.vertices() |
|
|
|
.cylinder(4, battery_holder_screw_radius) |
|
|
|
.workplane(offset=-(box_height / 2.0) + 11.10) |
|
|
|
.cylinder(6, battery_holder_screw_radius) |
|
|
|
.workplane(offset=-(box_height / 2.0) + 13.10) |
|
|
|
.move( |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 24.0, |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 25.5, |
|
|
|
-(battery_holder_slot_length / 6.5), |
|
|
|
) |
|
|
|
.vLine(battery_holder_hole_dist) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, 2.0, simple=screw_simple, fit="Close", counterSunk=False) |
|
|
|
.threadedHole( |
|
|
|
battery_screw, 4.0, simple=screw_simple, fit="Loose", counterSunk=False |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
bottom = ( |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 9.0) |
|
|
|
bottom.workplane(offset=-(box_height / 2.0) + 10.0) |
|
|
|
.move( |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 24.0, |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 25.5, |
|
|
|
(battery_holder_hole_dist * 2) - 8, |
|
|
|
) |
|
|
|
.vLine(-(battery_holder_hole_dist * 3)) |
|
|
|
.vertices() |
|
|
|
.cylinder(4, battery_holder_screw_radius) |
|
|
|
.workplane(offset=-(box_height / 2.0) + 11.10) |
|
|
|
.cylinder(6, battery_holder_screw_radius) |
|
|
|
.workplane(offset=-(box_height / 2.0) + 13.10) |
|
|
|
.move( |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 24.0, |
|
|
|
(box_length / 2.0 - wall_thickness * battery_holder_offset_factor) - 25.5, |
|
|
|
(battery_holder_hole_dist * 2) - 8, |
|
|
|
) |
|
|
|
.vLine(-(battery_holder_hole_dist * 3)) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, 2.0, simple=screw_simple, fit="Close", counterSunk=False) |
|
|
|
.threadedHole( |
|
|
|
battery_screw, 4.0, simple=screw_simple, fit="Loose", counterSunk=False |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
bottom = ( |
|
|
@ -258,6 +269,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(top) |
|
|
|
show_object(bottom) |
|
|
|
except NameError: |
|
|
|
pass |
|
|
|