Adjust battery holder parameters
This commit is contained in:
parent
af3e1824f4
commit
a894e8319c
@ -1,14 +1,12 @@
|
|||||||
import cadquery as cq
|
import cadquery as cq
|
||||||
|
|
||||||
stand_positions = [(0, 0), (58, 0), (58, 49), (0, 49)]
|
stand_positions = [(0, 0), (58, 0), (58, 49), (0, 49)]
|
||||||
|
|
||||||
lower_stands = cq.Sketch().push(stand_positions).circle(3, mode="a")
|
lower_stands = cq.Sketch().push(stand_positions).circle(3, mode="a")
|
||||||
|
|
||||||
higher_stands = cq.Sketch().push(stand_positions).circle(2.65 / 2, mode="a")
|
higher_stands = cq.Sketch().push(stand_positions).circle(2.65 / 2, mode="a")
|
||||||
|
pillar_height = 7
|
||||||
|
|
||||||
# This is a holder for DuPont cables so they connect to this
|
# This is a holder for DuPont cables so they connect to this
|
||||||
# things' pogo pins which are used to power the CPU
|
# things' pogo pins which are used to power the CPU
|
||||||
|
|
||||||
pin_positions = [(4, 0), (4 * 2.54 + 4, 0)]
|
pin_positions = [(4, 0), (4 * 2.54 + 4, 0)]
|
||||||
pin_holder_width = 25
|
pin_holder_width = 25
|
||||||
pin_holder_height = 15
|
pin_holder_height = 15
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -82,20 +82,13 @@ usb_in = cq.Sketch().trapezoid(13, 5.5, 90, mode="a")
|
|||||||
# Hole for the USB hub's exposed port
|
# Hole for the USB hub's exposed port
|
||||||
audio_in = cq.Sketch().trapezoid(17, 6, 90, mode="a")
|
audio_in = cq.Sketch().trapezoid(17, 6, 90, mode="a")
|
||||||
|
|
||||||
|
# Battery holder position from front-left corner of the case
|
||||||
|
battery_offset_x = 21
|
||||||
|
battery_offset_y = 56
|
||||||
# Holes for the battery power cable and button
|
# Holes for the battery power cable and button
|
||||||
power_in = cq.Sketch().trapezoid(10, 5.5, 90, mode="a")
|
power_in = cq.Sketch().trapezoid(10, 5.5, 90, mode="a")
|
||||||
power_button_cut = cq.Sketch().trapezoid(7, 7, 90, mode="a")
|
power_button_cut = cq.Sketch().trapezoid(7, 7, 90, mode="a")
|
||||||
|
|
||||||
# CPU stand pins
|
|
||||||
lower_stands = (
|
|
||||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(3, mode="a")
|
|
||||||
)
|
|
||||||
|
|
||||||
higher_stands = (
|
|
||||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(2.65 / 2, mode="a")
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def model():
|
def model():
|
||||||
return (
|
return (
|
||||||
@ -112,14 +105,24 @@ def model():
|
|||||||
# The position is arbitrary, based on the components available
|
# The position is arbitrary, based on the components available
|
||||||
.faces(">Y")
|
.faces(">Y")
|
||||||
.workplane(centerOption="CenterOfBoundBox")
|
.workplane(centerOption="CenterOfBoundBox")
|
||||||
.center(width / 2 - 15 - 21, -8.5)
|
# The 15 is distance from stand hole center to center of USB plug
|
||||||
|
# The -1 is distance from top of the pillar to center of USB plug
|
||||||
|
.center(
|
||||||
|
width / 2 - battery_offset_x - 15,
|
||||||
|
-thickness / 2 + battery_holder.pillar_height + shell_t - 1,
|
||||||
|
)
|
||||||
.placeSketch(power_in)
|
.placeSketch(power_in)
|
||||||
.cutBlind(-shell_t)
|
.cutBlind(-shell_t)
|
||||||
# Power button
|
# Power button
|
||||||
# The position is arbitrary, based on the components available,
|
# The position is arbitrary, based on the components available,
|
||||||
.faces(">Y")
|
.faces(">Y")
|
||||||
.workplane(centerOption="CenterOfBoundBox")
|
.workplane(centerOption="CenterOfBoundBox")
|
||||||
.center(width / 2 - 67 - 21, -1)
|
# The 67 is distance from stand hole center to center of power button
|
||||||
|
# The 5 is distance from top of the pillar to center of power button
|
||||||
|
.center(
|
||||||
|
width / 2 - battery_offset_x - 67,
|
||||||
|
-thickness / 2 + battery_holder.pillar_height + shell_t + 5,
|
||||||
|
)
|
||||||
.placeSketch(power_button_cut)
|
.placeSketch(power_button_cut)
|
||||||
.cutBlind(-shell_t)
|
.cutBlind(-shell_t)
|
||||||
# USB inlet
|
# USB inlet
|
||||||
@ -187,27 +190,29 @@ def model():
|
|||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||||
.center(width / 2 - 40, height / 2 - 65)
|
.center(width / 2 - 40, height / 2 - 65)
|
||||||
.placeSketch(cpu_holder.higher_stands)
|
.placeSketch(cpu_holder.higher_stands)
|
||||||
.extrude(13)
|
.extrude(10.5)
|
||||||
# Battery Stands (lower)
|
# Battery Stands (lower)
|
||||||
# The +18, -55 is the position of the battery system,
|
|
||||||
# and should be a parameter (TODO)
|
# and should be a parameter (TODO)
|
||||||
.workplaneFromTagged("mid_height")
|
.workplaneFromTagged("mid_height")
|
||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||||
.center(-width / 2 + 21, height / 2 - 56)
|
.center(-width / 2 + battery_offset_x, height / 2 - battery_offset_y)
|
||||||
.placeSketch(battery_holder.lower_stands)
|
.placeSketch(battery_holder.lower_stands)
|
||||||
.extrude(shell_t + 5)
|
.extrude(shell_t + battery_holder.pillar_height)
|
||||||
# Battery Stands (higher)
|
# Battery Stands (higher)
|
||||||
.workplaneFromTagged("mid_height")
|
.workplaneFromTagged("mid_height")
|
||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||||
.center(-width / 2 + 21, height / 2 - 56)
|
.center(-width / 2 + battery_offset_x, height / 2 - battery_offset_y)
|
||||||
.placeSketch(battery_holder.higher_stands)
|
.placeSketch(battery_holder.higher_stands)
|
||||||
.extrude(shell_t + 11)
|
.extrude(shell_t + battery_holder.pillar_height + 3.5)
|
||||||
# Pogo pin connector holders
|
# Pogo pin connector holders
|
||||||
.workplaneFromTagged("mid_height")
|
.workplaneFromTagged("mid_height")
|
||||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||||
.center(-width / 2 + 21, height / 2 - 56 - battery_holder.pin_holder_height / 2)
|
.center(
|
||||||
|
-width / 2 + battery_offset_x,
|
||||||
|
height / 2 - battery_offset_y - battery_holder.pin_holder_height / 2,
|
||||||
|
)
|
||||||
.placeSketch(battery_holder.pin_holder)
|
.placeSketch(battery_holder.pin_holder)
|
||||||
.extrude(shell_t + 4)
|
.extrude(shell_t + 3)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user