Add features to z nut mount

This commit is contained in:
Kelvin Ly 2025-03-22 08:33:09 -04:00
parent 8a9df2a62b
commit 19afdeb647
1 changed files with 30 additions and 4 deletions

View File

@ -457,7 +457,7 @@ class Carriage:
class Carrier:
def __init__(self, carriage):
def __init__(self, carriage, z):
self.plane = carriage.wp_carrier
self.left_spacer = (
cq.Workplane()
@ -521,8 +521,34 @@ class Carrier:
.extrude(200)
)
carriage.z_nut = self.ballscrew_model.nut(z_ballscrew_len / 2 + carriage.z)
ballscrew_offset = z_ballscrew_len / 2 + carriage.z / 2 - z
carriage.z_nut = self.ballscrew_model.nut(ballscrew_offset)
# TODO add carriage nut mount to carriage
carriage.z_nut_mount = (
cq.Workplane()
.copyWorkplane(carriage.plate.workplaneFromTagged("carriage_plate"))
.rect(60, 60)
.extrude(36)
.copyWorkplane(
carriage.plate.workplaneFromTagged("carriage_plate").transformed(
rotate=(180, 0, 0)
)
)
.rect(
44, 44
) # mounting holes; these need to line up with the x nut mounting holes
.vertices()
.hole(5)
.copyWorkplane(
self.ballscrew_model.w.transformed(
offset=(0, ballscrew_offset, 0), rotate=(90, 0, 0)
),
)
.hole(14) # hole for ballscrew
)
carriage.z_nut_mount = self.ballscrew_model.nutHoles(
carriage.z_nut_mount, ballscrew_offset
)
def assembly(self):
return (
@ -533,7 +559,7 @@ class Carrier:
.add(self.ballscrew, name="z ballscrew")
.add(self.fixed_bearing, name="z fixed bearing")
.add(self.floating_bearing, name="z floating bearing")
.add(self.stepper_mount, name="stepper motor/ballscrew mount")
.add(self.stepper_mount, name="stepper motor-ballscrew mount")
)
@ -574,7 +600,7 @@ class SpindleMount:
g = Gantry(cq.Workplane())
c = Carriage(g, 150, -50)
ca = Carrier(c)
ca = Carrier(c, -50)
m = SpindleMount(ca, -200)
# TODO add ball screws and associated assembly