|
|
@ -1,5 +1,8 @@ |
|
|
|
import cadquery as cq |
|
|
|
|
|
|
|
usb_h = 10.5 |
|
|
|
usb_v = 5.2 |
|
|
|
|
|
|
|
socket_distance_x = 10.8 |
|
|
|
socket_distance_y = 36.55 |
|
|
|
socket_width = 28 |
|
|
@ -121,6 +124,21 @@ bottom = ( |
|
|
|
.cutBlind("next") |
|
|
|
) |
|
|
|
|
|
|
|
holes = ( |
|
|
|
cq.Workplane("XY") |
|
|
|
.rect((p_outerWidth - 20.0 * p_thickness), (p_outerLength - 20.0 * p_thickness)) |
|
|
|
.vertices() |
|
|
|
.cylinder(10, 3.1 / 2) |
|
|
|
) |
|
|
|
|
|
|
|
bottom = bottom.cut(holes) |
|
|
|
|
|
|
|
bottom = ( |
|
|
|
bottom.faces(">Y[0]") |
|
|
|
.workplane(offset=0) |
|
|
|
.move(0, -(p_outerHeight / 2) - usb_v - 3.3) |
|
|
|
.box(usb_h, usb_v, 10, combine="cut") |
|
|
|
) |
|
|
|
|
|
|
|
# lid = (lid.center(socket_width-8, socket_distance_y+(socket_width)-3) |
|
|
|
# .rect(reset_height, reset_width) |
|
|
@ -162,4 +180,9 @@ if p_flipLid: |
|
|
|
# return the combined result |
|
|
|
result = topOfLid.union(bottom) |
|
|
|
|
|
|
|
cq.exporters.export(result, "/home/wes/model_files/enclosure.step") |
|
|
|
cq.exporters.export(bottom, "/home/deck/model_files/enclosure_bottom.step") |
|
|
|
|
|
|
|
try: |
|
|
|
show_object(bottom) |
|
|
|
except NameError: |
|
|
|
pass |
|
|
|