cadquery/notebook_nueva/battery_holder.py

33 lines
833 B
Python

import cadquery as cq
stand_positions = [(0, 0), (58, 0), (58, 49), (0, 49)]
lower_stands = cq.Sketch().push(stand_positions).circle(3, mode="a")
higher_stands = cq.Sketch().push(stand_positions).circle(2.65 / 2, mode="a")
# This is a holder for DuPont cables so they connect to this
# things' pogo pins which are used to power the CPU
pin_positions = [(4, 0), (4 * 2.54 + 4, 0)]
pin_holder_width = 25
pin_holder_height = 15
pin_holder = (
cq.Sketch()
.polygon(
[
(0, 0),
(pin_holder_width, 0),
(pin_holder_width, pin_holder_height),
(0, pin_holder_height),
(0, 0),
],
mode="a",
)
.push(pin_positions)
.polygon(
[(0, 0), (2.6, 0), (2.6, pin_holder_height), (0, pin_holder_height), (0, 0)],
mode="s",
)
)