Add mounting holes for spindle

This commit is contained in:
Kelvin Ly 2025-03-24 23:13:34 -04:00
parent c4f687ea99
commit ad93f7a995
1 changed files with 28 additions and 3 deletions

View File

@ -565,7 +565,7 @@ class Carrier:
.copyWorkplane(
self.plane.transformed(
offset=(0, z_rail_len / 2 + 10, 0), rotate=(-90, 0, 0)
).transformed(offset=(0, -offset.y, 0), rotate=(0, 0, 30))
).transformed(offset=(0, -offset.y, 0), rotate=(0, 0, 45))
)
.tag("stepper_center")
.rect(58.4, 58.4)
@ -675,6 +675,7 @@ class SpindleMount:
.transformed(rotate=(0, 0, 180))
)
self.spindleaxis = cq.Workplane().copyWorkplane(self.plane).center(0, 54)
self.mount_points = [(x, y) for x in [-85, 85] for y in [60, 40, 20]]
self.mount = (
cq.Workplane()
.copyWorkplane(self.plane)
@ -692,11 +693,26 @@ class SpindleMount:
.cylinder(78, 104 / 2, angle=180, centered=[True, True, False])
.copyWorkplane(self.spindleaxis)
.cylinder(78, 80 / 2, centered=[True, True, False], combine="s")
.copyWorkplane(
carrier.plane.transformed(
offset=(0, z_offset, z_spacer_z + 10), rotate=(0, 180, 0)
)
)
.tag("mounting_plane")
.pushPoints(self.mount_points)
.hole(6)
)
def mounting_holes(self, w):
# TODO
pass
return (
w.copyWorkplane(
self.mount.workplaneFromTagged("mounting_plane").transformed(
rotate=(180, 0, 0)
)
)
.pushPoints(self.mount_points)
.hole(6)
)
def assembly(self):
return cq.Assembly(name="spindle motor mount").add(self.mount, name="mount")
@ -706,6 +722,15 @@ g = Gantry(cq.Workplane())
c = Carriage(g, 150, -50)
ca = Carrier(c, -50)
m = SpindleMount(ca, -200)
m2 = SpindleMount(ca, -200 + 80)
m3 = SpindleMount(ca, -200 + 160)
m4 = SpindleMount(ca, -200 + 240)
m5 = SpindleMount(ca, -200 + 320)
ca.plate = m.mounting_holes(ca.plate)
ca.plate = m2.mounting_holes(ca.plate)
ca.plate = m3.mounting_holes(ca.plate)
ca.plate = m4.mounting_holes(ca.plate)
ca.plate = m5.mounting_holes(ca.plate)
# TODO add ball screws and associated assembly