refactor(cad): change the builder variable to the name of the part
This commit is contained in:
+5
-5
@@ -27,7 +27,7 @@ assert (screw_blocks_width - (screw_blocks_radius * 2)) >= 0
|
||||
assert (bearing_offset - screw_blocks_height) >= 0
|
||||
|
||||
|
||||
with BuildPart() as builder:
|
||||
with BuildPart() as drive_shaft_mount:
|
||||
with BuildSketch() as sketch:
|
||||
with BuildLine() as profile:
|
||||
l1 = Line(
|
||||
@@ -73,14 +73,14 @@ with BuildPart() as builder:
|
||||
extrude(amount=thickness / 2)
|
||||
mirror(about=Plane.XY)
|
||||
|
||||
with Locations((0, bearing_offset, builder.faces().sort_by(Axis.Z)[-1].center().Z)):
|
||||
with Locations((0, bearing_offset, drive_shaft_mount.faces().sort_by(Axis.Z)[-1].center().Z)):
|
||||
Hole(bearing_diameter / 2, (thickness / 2) + (bearing_height / 2))
|
||||
Hole(shaft_clearance_diameter / 2, (thickness / 2) - (bearing_height / 2))
|
||||
|
||||
Box(core_width + (screw_blocks_width * 2), track_width, track_height, (90, 0, 0), (Align.CENTER, Align.CENTER, Align.MIN))
|
||||
|
||||
with Locations(builder.faces().filter_by(Plane.XZ).sort_by(Axis.Y)[-2:]):
|
||||
with Locations(drive_shaft_mount.faces().filter_by(Plane.XZ).sort_by(Axis.Y)[-2:]):
|
||||
CounterBoreHole(screw_body_diameter / 2, screw_head_diameter / 2, screw_head_depth)
|
||||
|
||||
assert builder.part is not None
|
||||
export_step(builder.part, "drive shaft mount.step")
|
||||
assert drive_shaft_mount.part is not None
|
||||
export_step(drive_shaft_mount.part, "drive shaft mount.step")
|
||||
|
||||
Reference in New Issue
Block a user