29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""Approximate threaded stud, roller body, and hex-end silhouette.
|
|
|
|
The image does not define a thread standard. Rings represent the visible
|
|
thread rhythm while keeping the concept model lightweight and editable.
|
|
"""
|
|
|
|
from build123d import BuildPart, BuildSketch, Cylinder, Mode, Plane, Pos, RegularPolygon, extrude
|
|
|
|
from shaft_common import add_thread_rings, cut_end_bore, export_horizontal, stepped_body
|
|
|
|
|
|
def _hex_prism(z_start, across_corners, length):
|
|
with BuildPart() as prism:
|
|
with BuildSketch(Plane.XY.offset(z_start)):
|
|
RegularPolygon(radius=across_corners / 2.0, side_count=6)
|
|
extrude(amount=length)
|
|
return prism.part
|
|
|
|
|
|
def gen_step():
|
|
# Minor thread stem, neck, roller, and short nut-supporting neck.
|
|
body, total = stepped_body([(8.2, 40.0), (9.5, 7.0), (28.0, 25.0), (10.0, 4.0)])
|
|
body = add_thread_rings(body, z_start=0.5, length=38.5, major_diameter=10.0, pitch=2.0)
|
|
hex_body = _hex_prism(total - 0.15, across_corners=22.0, length=11.0)
|
|
body = body + hex_body
|
|
total += 10.85
|
|
body = cut_end_bore(body, total, diameter=8.0, depth=8.0)
|
|
return export_horizontal(body, "threaded_roller_067249_like")
|