Roger Maitland#7070 | # Soften the sharp edges
fillet(holder.edges().filter_by(Axis.Y).sort_by(Axis.X)[2:4], lip / 3)
chamfer(holder.edges().filter_by_position(Axis.X, 1, size.X), 1 * MM)
# Create the mounting screw hole
with Locations(holder.faces().group_by(SortBy.AREA)[-1].sort_by(Axis.Y)[-1]):
h = CounterSinkHole(3.8 * MM / 2, 7 * MM / 2)
# Mirror to complete the part
mirror(about=Plane.YZ)
# Create a centered alignment notch to help with mounting
min_z = holder.part.bounding_box().min.Z
with Locations((0, -thickness, min_z)):
Box(
sqrt(2),
thickness,
sqrt(2),
rotation=(0, 45, 0),
align=(Align.CENTER, Align.MIN, Align.CENTER),
mode=Mode.SUBTRACT,
)
holder.part.export_step("holder-212.step")
print(f"Mounting holes spacing: {2*h.center().X:0.1f}mm")
show(holder) | 19:29:29 |