|
|
@ -38,12 +38,8 @@ bb_hole_diameter = 2.76 |
|
|
|
|
|
|
|
# buck converter |
|
|
|
|
|
|
|
bc_height = 43.18 |
|
|
|
bc_width = 31.16 |
|
|
|
|
|
|
|
bc_hole_dist_from_top = 6.44 |
|
|
|
bc_hole_dist_from_side = 2.21 # distance to middle of hole as before, also it's the distance from the closer side |
|
|
|
bc_hole_diameter = 4.18 |
|
|
|
bc_height = 29.83 # from center of hole to other hole |
|
|
|
bc_width = 15 # from center of hole to other hole, but horizontally |
|
|
|
|
|
|
|
# large buck converter |
|
|
|
|
|
|
@ -55,6 +51,9 @@ lbc_hole_dist_from_side = 25.8 |
|
|
|
lbc_hole_diameter = 5.8 |
|
|
|
lbc_hole_radius = lbc_hole_diameter / 2.0 |
|
|
|
|
|
|
|
pwm_width = 13.45 |
|
|
|
pwm_height = 34 |
|
|
|
|
|
|
|
wall_thickness = 3 |
|
|
|
|
|
|
|
# for a box, not octogon |
|
|
@ -62,7 +61,7 @@ wall_thickness = 3 |
|
|
|
# box_width = 157 + wall_thickness |
|
|
|
|
|
|
|
box_radius = 87 + wall_thickness |
|
|
|
box_thickness = 25 |
|
|
|
box_thickness = 42 |
|
|
|
|
|
|
|
pole_height = box_thickness - 3 |
|
|
|
inner_pole_height = 13 |
|
|
@ -79,8 +78,9 @@ def make_component_holder_octogon( |
|
|
|
x_offset=0, |
|
|
|
y_offset=0, |
|
|
|
): |
|
|
|
pole_height_pct = 0.2 |
|
|
|
return ( |
|
|
|
result.workplane(offset=(pole_height / 2) - wall_thickness) |
|
|
|
result.workplane(offset=(pole_height / 3) - wall_thickness) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.makePolygon( |
|
|
|
regularPolygon( |
|
|
@ -94,7 +94,7 @@ def make_component_holder_octogon( |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.cylinder(pole_height, 3) |
|
|
|
.workplane(offset=(pole_height - wall_thickness + 1.5)) |
|
|
|
.workplane(offset=(pole_height * (1 - pole_height_pct) - wall_thickness + 2.2)) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.makePolygon( |
|
|
|
regularPolygon( |
|
|
@ -105,7 +105,9 @@ def make_component_holder_octogon( |
|
|
|
) |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, pole_height * 0.6, simple=screw_simple, fit="Close") |
|
|
|
.threadedHole( |
|
|
|
top_screw, pole_height * pole_height_pct, simple=screw_simple, fit="Close" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -117,9 +119,10 @@ def make_component_holder_line( |
|
|
|
line_y_dist=0, |
|
|
|
x_offset=0, |
|
|
|
y_offset=0, |
|
|
|
screw=top_screw, |
|
|
|
): |
|
|
|
return ( |
|
|
|
result.workplane(offset=(wall_thickness / 2.0)) |
|
|
|
result.workplane(offset=-wall_thickness) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.line( |
|
|
|
line_x_dist, |
|
|
@ -127,44 +130,77 @@ def make_component_holder_line( |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.cylinder(inner_pole_height, pole_radius) |
|
|
|
.workplane(offset=(wall_thickness * 2) + 3.7) |
|
|
|
.workplane(offset=(wall_thickness * 1.7)) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.line( |
|
|
|
line_x_dist, |
|
|
|
line_y_dist, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, inner_pole_height, simple=screw_simple, fit="Close") |
|
|
|
.threadedHole(screw, inner_pole_height, simple=screw_simple, fit="Close") |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
def make_component_holder( |
|
|
|
result, |
|
|
|
pole_dist, |
|
|
|
pole_height=0, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
pole_radius=3, |
|
|
|
box_width=None, |
|
|
|
box_height=None, |
|
|
|
x_offset=0, |
|
|
|
y_offset=0, |
|
|
|
screw=top_screw, |
|
|
|
): |
|
|
|
return ( |
|
|
|
result.workplane(offset=(wall_thickness / 2.0)) |
|
|
|
result.workplane(offset=-wall_thickness) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.rect( |
|
|
|
box_height, |
|
|
|
box_width, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.cylinder(inner_pole_height, pole_radius) |
|
|
|
.workplane(offset=(wall_thickness * 2) + 3.7) |
|
|
|
.cylinder(pole_height, pole_radius) |
|
|
|
.workplane(offset=wall_thickness * 1.7) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.rect( |
|
|
|
box_height, |
|
|
|
box_width, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.threadedHole(screw, pole_height, simple=screw_simple, fit="Close") |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
def make_component_holder_self_tapping( |
|
|
|
result, |
|
|
|
pole_dist, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
pole_radius=3, |
|
|
|
box_width=None, |
|
|
|
box_height=None, |
|
|
|
x_offset=0, |
|
|
|
y_offset=0, |
|
|
|
thread_diameter=1.2, |
|
|
|
): |
|
|
|
thread_radius = thread_diameter / 2.0 |
|
|
|
return ( |
|
|
|
result.workplane(offset=-wall_thickness) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.rect( |
|
|
|
box_height, |
|
|
|
box_width, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.cylinder(pole_height, pole_radius) |
|
|
|
.workplane(offset=(wall_thickness)) |
|
|
|
.move(x_offset, y_offset) |
|
|
|
.rect( |
|
|
|
box_height, |
|
|
|
box_width, |
|
|
|
) |
|
|
|
.vertices() |
|
|
|
.threadedHole(top_screw, inner_pole_height, simple=screw_simple, fit="Close") |
|
|
|
.cylinder(pole_height * 0.7, thread_radius, combine="cut") |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -207,20 +243,10 @@ lower_box = make_component_holder_octogon( |
|
|
|
lower_box, pole_height, pole_dist, box_radius, x_offset=0, y_offset=0 |
|
|
|
) |
|
|
|
|
|
|
|
""" |
|
|
|
lower_box = make_component_holder( |
|
|
|
lower_box, |
|
|
|
pole_dist, |
|
|
|
pole_height, |
|
|
|
box_width, |
|
|
|
box_height, |
|
|
|
) |
|
|
|
""" |
|
|
|
|
|
|
|
lower_box = make_component_holder( |
|
|
|
lower_box, |
|
|
|
pole_dist, |
|
|
|
pole_height=5, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
box_width=breadboard_width, |
|
|
|
box_height=breadboard_height, |
|
|
|
x_offset=0, |
|
|
@ -229,7 +255,7 @@ lower_box = make_component_holder( |
|
|
|
|
|
|
|
lower_box = make_component_holder_line( |
|
|
|
lower_box, |
|
|
|
pole_height=5, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
line_x_dist=breadboard_height + 3.8, |
|
|
|
line_y_dist=0, |
|
|
|
x_offset=-(breadboard_height / 2.0) - 1.9, |
|
|
@ -237,15 +263,9 @@ lower_box = make_component_holder_line( |
|
|
|
) |
|
|
|
|
|
|
|
bc_pole_radius = 4 |
|
|
|
lower_box = lower_box.workplane(offset=-4).move(0, -50).box(lbc_width - 5, 5, 13) |
|
|
|
lower_box = ( |
|
|
|
lower_box.workplane(offset=(wall_thickness / 2.0)) |
|
|
|
.move(0, -50) |
|
|
|
.box(lbc_width - 5, 5, 13) |
|
|
|
) |
|
|
|
lower_box = ( |
|
|
|
lower_box.workplane(offset=(wall_thickness / 2.0)) |
|
|
|
.move(0, bc_pole_radius) |
|
|
|
.box(lbc_width - 5, 5, 13) |
|
|
|
lower_box.workplane(offset=-4).move(0, bc_pole_radius).box(lbc_width - 5, 5, 13) |
|
|
|
) |
|
|
|
|
|
|
|
lower_box = make_component_holder_line( |
|
|
@ -258,6 +278,28 @@ lower_box = make_component_holder_line( |
|
|
|
y_offset=-(lbc_width - lbc_hole_diameter - lbc_hole_radius + 1.1), |
|
|
|
) |
|
|
|
|
|
|
|
# small buck converter |
|
|
|
lower_box = make_component_holder( |
|
|
|
lower_box, |
|
|
|
pole_dist, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
box_width=bc_height, |
|
|
|
box_height=bc_width, # yes they're reversed on purpose |
|
|
|
x_offset=50, |
|
|
|
y_offset=-30, |
|
|
|
) |
|
|
|
|
|
|
|
# mosfets |
|
|
|
lower_box = make_component_holder_self_tapping( |
|
|
|
lower_box, |
|
|
|
pole_dist, |
|
|
|
pole_height=inner_pole_height, |
|
|
|
box_width=pwm_height, |
|
|
|
box_height=pwm_width, # yes they're reversed on purpose |
|
|
|
x_offset=-55, |
|
|
|
y_offset=15, |
|
|
|
) |
|
|
|
|
|
|
|
# lower_box = lower_box.workplane(offset=(wall_thickness / 2.0)).box(lbc_height, 5, 13) |
|
|
|
|
|
|
|
cq.exporters.export(lower_box, "/home/deck/model_files/fan_control_box_lower.stl") |
|
|
|