Add holes for mounting alignment plates to base, and x stepper mount
This commit is contained in:
parent
0d2eff8804
commit
929cd9430f
115
gantry.py
115
gantry.py
|
@ -141,10 +141,28 @@ class Gantry:
|
|||
w.copyWorkplane(right_bearing_base)
|
||||
.rect(tube_h, x_rail_spacing - tube_w)
|
||||
.extrude(x_mount_z)
|
||||
.copyWorkplane(right_bearing_base)
|
||||
.center(-4, 0)
|
||||
.rect(35, 35)
|
||||
.center(-ballscrew_x_offset, 0)
|
||||
.tag("ballscrew_center")
|
||||
.circle(12 / 2)
|
||||
.extrude(20, combine="s")
|
||||
.workplaneFromTagged("ballscrew_center")
|
||||
.center(35 / 2 - 4 / 2, 0)
|
||||
.rect(4, 35)
|
||||
.extrude(20, combine="s")
|
||||
.workplaneFromTagged("ballscrew_center")
|
||||
.center(-35 / 2 + 4 / 2, 0)
|
||||
.rect(4, 35)
|
||||
.extrude(20, combine="s")
|
||||
.workplaneFromTagged("ballscrew_center")
|
||||
.center(0, -35 / 2 + 4 / 2)
|
||||
.rect(25, 4)
|
||||
.extrude(20, combine="s")
|
||||
.workplaneFromTagged("ballscrew_center")
|
||||
.center(0, 35 / 2 - 4 / 2)
|
||||
.rect(25, 4)
|
||||
.extrude(20, combine="s")
|
||||
# .rect(35, 35)
|
||||
# .extrude(20, combine="s")
|
||||
)
|
||||
self.right_bearing_mount = self.ball_screw_model.fixedBearingHoles(
|
||||
self.right_bearing_mount
|
||||
|
@ -155,6 +173,73 @@ class Gantry:
|
|||
.rect(tube_h, x_rail_spacing - tube_w)
|
||||
.extrude(x_mount_z)
|
||||
)
|
||||
# this doesn't work for some reason, i guess just use the fixed bearing mount flipped
|
||||
self.left_bearing_mount = self.ball_screw_model.floatingBearingHoles(
|
||||
self.left_bearing_mount
|
||||
)
|
||||
|
||||
points = [(40 * (i - 5.5), y) for i in range(12) for y in [-18, 18]]
|
||||
points += [
|
||||
(8 * i + j, y)
|
||||
for i in range(-2, 3)
|
||||
for y in [-18, 18]
|
||||
for j in [column_spacing / 2, -column_spacing / 2]
|
||||
]
|
||||
top_w = cq.Workplane().copyWorkplane(self.upper_front_plate)
|
||||
bot_w = cq.Workplane().copyWorkplane(self.lower_front_plate)
|
||||
|
||||
def holes(w, ref):
|
||||
return w.copyWorkplane(ref).pushPoints(points).hole(3)
|
||||
|
||||
self.upper_front_plate = holes(self.upper_front_plate, top_w)
|
||||
self.upper_back_plate = holes(self.upper_back_plate, top_w)
|
||||
# self.upper = top_holes(self.upper)
|
||||
self.lower_front_plate = holes(self.lower_front_plate, bot_w)
|
||||
self.lower_back_plate = holes(self.lower_back_plate, bot_w)
|
||||
# self.lower = top_holes(self.lower)
|
||||
|
||||
stepper_mount_w = w.transformed(
|
||||
offset=(
|
||||
column_spacing / 2 + tube_w / 2,
|
||||
ballscrew_x_offset,
|
||||
(upper_center + lower_center) / 2,
|
||||
),
|
||||
rotate=(0, 90, 0),
|
||||
)
|
||||
|
||||
self.stepper_mount = (
|
||||
cq.Workplane()
|
||||
.copyWorkplane(
|
||||
stepper_mount_w.transformed(offset=(0, 0, 0), rotate=(0, 0, 45))
|
||||
)
|
||||
.rect(58.4, 58.4)
|
||||
.extrude(5)
|
||||
.copyWorkplane(
|
||||
stepper_mount_w.transformed(offset=(0, -ballscrew_x_offset, 0))
|
||||
)
|
||||
.rect(88, tube_h)
|
||||
.extrude(5)
|
||||
.copyWorkplane(
|
||||
stepper_mount_w.transformed(offset=(0, 0, 0), rotate=(180, 0, 45))
|
||||
)
|
||||
.rect(47.41, 47.41, forConstruction=True)
|
||||
.vertices()
|
||||
.hole(5)
|
||||
.copyWorkplane(
|
||||
stepper_mount_w.transformed(offset=(0, 0, 0), rotate=(180, 0, 0))
|
||||
)
|
||||
.hole(40)
|
||||
.copyWorkplane(
|
||||
stepper_mount_w.transformed(offset=(0, -ballscrew_x_offset, 5))
|
||||
)
|
||||
.rect(78, 30)
|
||||
.vertices()
|
||||
.hole(5)
|
||||
# .copyWorkplane(stepper_mount_w)
|
||||
# .circle(40)
|
||||
# .extrude(10)
|
||||
)
|
||||
self.stepper_mount = self.ball_screw_model.fixedBearingHoles(self.stepper_mount)
|
||||
|
||||
def assembly(self):
|
||||
return (
|
||||
|
@ -174,6 +259,7 @@ class Gantry:
|
|||
.add(self.floating_bearing, name="floating bearing")
|
||||
.add(self.right_bearing_mount, name="fixed bearing mount")
|
||||
.add(self.left_bearing_mount, name="floating bearing mount")
|
||||
.add(self.stepper_mount, name="stepper mount")
|
||||
)
|
||||
|
||||
|
||||
|
@ -339,6 +425,10 @@ class Carrier:
|
|||
.transformed(offset=(0, 0, z_spacer_z))
|
||||
.rect(200, z_rail_len)
|
||||
.extrude(10)
|
||||
.copyWorkplane(self.plane)
|
||||
.center(0, z_rail_len / 2 - 40 / 2)
|
||||
.rect(68, 40)
|
||||
.extrude(20, combine="s")
|
||||
)
|
||||
self.plate = carriage.left_rail.holes(self.plate)
|
||||
self.plate = carriage.right_rail.holes(self.plate)
|
||||
|
@ -349,7 +439,7 @@ class Carrier:
|
|||
self.plane.transformed(
|
||||
offset=(
|
||||
0,
|
||||
z_ballscrew_len / 2,
|
||||
z_ballscrew_len / 2 + 20,
|
||||
# 25,
|
||||
z_spacer_z - 25 + 5, # offset into the spindle plate 5mm
|
||||
), # -(HGR20.H - z_spacer_z) / 2 - 1.2),
|
||||
|
@ -361,6 +451,21 @@ class Carrier:
|
|||
self.fixed_bearing = self.ballscrew_model.fixedBearing()
|
||||
self.floating_bearing = self.ballscrew_model.floatingBearing()
|
||||
|
||||
angle_z = 0.188 * 25.4
|
||||
angle_w = 2.0 * 25.4
|
||||
self.stepper_mount = (
|
||||
cq.Workplane()
|
||||
.copyWorkplane(self.plane)
|
||||
.transformed(offset=(-200 / 2, z_rail_len / 2, 0), rotate=(0, 90, 0))
|
||||
.sketch()
|
||||
.push([(-10 - 10 - angle_z + angle_w / 2, angle_z / 2 + 5)])
|
||||
.rect(angle_w, angle_z)
|
||||
.push([(-10 - 10 - angle_z / 2, 5 + angle_z - angle_w / 2)])
|
||||
.rect(angle_z, angle_w)
|
||||
.finalize()
|
||||
.extrude(200)
|
||||
)
|
||||
|
||||
carriage.z_nut = self.ballscrew_model.nut(z_ballscrew_len / 2 + carriage.z)
|
||||
# TODO add carriage nut mount to carriage
|
||||
|
||||
|
@ -373,6 +478,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")
|
||||
)
|
||||
|
||||
|
||||
|
@ -430,4 +536,3 @@ show_object(full_assembly)
|
|||
# show_object(ca.assembly())
|
||||
# show_object(c.assembly())
|
||||
# show_object(g.assembly())
|
||||
|
||||
|
|
3
utils.py
3
utils.py
|
@ -203,7 +203,7 @@ class SFU1204:
|
|||
Y = 10.8
|
||||
Z = 1.5
|
||||
|
||||
w = self.w.transformed(offset=(0, self.len - 10 + L, 0), rotate=(90, 0, 0))
|
||||
w = self.w.transformed(offset=(0, self.len - 10 + L - 20, 0), rotate=(90, 0, 0))
|
||||
solid = (
|
||||
solid.copyWorkplane(w)
|
||||
.center(0, -E / 2)
|
||||
|
@ -476,4 +476,3 @@ if __name__ == "__main__":
|
|||
show_object(bearing_holder2)
|
||||
|
||||
# show_object(cq.Workplane().placeSketch(HGR20.rail_sketch().assemble()).extrude(10))
|
||||
|
||||
|
|
Loading…
Reference in New Issue