Files
CAD-bestanden/KennedyPegboard/Toolholders/multiconnect/basicBackSlot.py

37 lines
1.0 KiB
Python

from ocp_vscode import *
from build123d import *
set_port(3939)
# Distance hart to hart holes pegboard 1-1/2" or about 38.1 mm
hdhh = hole_distance_hart_to_hart = 38.1
wmh = width_multiconnector_hole = 20.3
dmh = depth_multiconnector_hole = 4.15
dbr = depth_big_round = 1.2121
dsr = depth_small_round = 0.4379
db = depth_bevel = 2.5
# Make one basic connector
with BuildPart() as backSlot:
# Make a polyline sketch and revolve it 180 degrees
with BuildSketch() as sk_backSlot:
with BuildLine() as ln_backSlot:
pts = [
(0, 0),
((wmh+4)/2, 0),
(((wmh+4)/2), dmh+2),
(((wmh+4)/2)-db-2, dmh+2),
(((wmh+4)/2)-db-2, dmh+2-dsr),
((wmh+4)/2-2, dbr+2),
((wmh+4)/2-2, 2),
(0, 2)
]
Polyline(pts)
make_face()
revolve(revolution_arc=180.0, axis=Axis.Y)
# Add a straight part to it
plane = (backSlot.faces(Select.LAST).sort_by(Axis.Z)[-1])
extrude(plane, amount = 4)
show_all()