cadquery/notebook_nueva/battery_holder.py

28 lines
843 B
Python
Raw Normal View History

2023-02-17 17:32:01 +00:00
import cadquery as cq
2023-02-16 17:57:32 +00:00
2023-02-17 13:08:05 +00:00
cpu_stand_positions = [(0, 0), (58, 0), (58, 49), (0, 49)]
2023-02-16 17:57:32 +00:00
2023-02-16 17:57:51 +00:00
lower_stands = cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
2023-02-16 17:57:32 +00:00
2023-02-16 17:57:51 +00:00
higher_stands = cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
2023-02-17 20:55:20 +00:00
# This is a holder for DuPont cables so they connect to this
# things' pogo pins which are used to power the CPU
if __name__ == "__main__":
pin_positions = [(0, 0), (4 * 2.54, 0)]
width = 5 * 2.54 + 1
height = 7
model = (
cq.Workplane("XY")
.workplane()
.box(width, height, 2.54 + 1)
.faces(">Z")
.workplane(centerOption="CenterOfBoundBox")
.center(-width / 2 + 1.75, 0)
.placeSketch(cq.Sketch().push(pin_positions).trapezoid(2.60, 10, 90, mode="a"))
.cutBlind(-2.54)
)
cq.exporters.export(model, "pogo_plug.stl")