Connector met haak er aan vast

This commit is contained in:
2024-12-30 21:46:03 +01:00
parent 29dcf4d994
commit 26e9e2490c
11 changed files with 2723 additions and 169 deletions

View File

@@ -0,0 +1,35 @@
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
with BuildPart() as backSlot:
# Box(10, 5, 3)
with BuildSketch() as sk_backSlot:
Rectangle(10, 5)
extrude(amount = db)
#arrayOfEdges = backSlot.edges()
#edgs = backSlot.faces().sort_by(Axis.Z)[0].vertices().filter_by(Axis.X)
#fillet(edgs, 0.5)
#vertice = backSlot.vertices()
#for i, vertex in enumerate(vertice):
# print(f"Vertex {i}: {vertex}")
#edge_0_vertices = [v for v in edge.vertices()]
#for v in edge_0_vertices:
# print(f"Edge 0 vertex: {v}")
#face = backSlot.faces()[-1]
#for i, edge in enumerate(face.edges()):
# print(f"edgs {i}: {edge}")
chamfer(backSlot.edges().group_by(Axis.Z)[0].sort_by(Axis.X)[0], length = 1, length2 = 3)
fillet(backSlot.edges(), 0.5)
show_all()

View File

@@ -2,7 +2,7 @@ from ocp_vscode import *
from build123d import *
set_port(3939)
tt = thickness_toolboard = 0.8
tt = thickness_toolboard = 2.0
ttc = thickness_total_connector = 4.0
bh = board_hole = 9.8
dc = depth_clamp = 4.0
@@ -31,5 +31,5 @@ with BuildPart() as clamp:
extrude(amount = bh)
fillet(clamp.edges(), radius = 0.2)
#export_step(clamp.part, "connectorHoleClamp.step")
#export_stl(clamp.part, "connectorHoleClamp.stl")
show_all()

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,9 @@ from ocp_vscode import *
from build123d import *
set_port(3939)
tt = thickness_toolboard = 0.8
# Kennedy Pegboard hole size = 10 x 10 mm
tt = thickness_toolboard = 2.0
ttc = thickness_total_connector = 4.0
cw = clamp_width = 9.8
dc = depth_clamp = 4.0
@@ -28,5 +30,5 @@ with BuildPart() as clampLock:
extrude(amount = cw)
fillet(clampLock.edges(), radius = 0.2)
export_step(clampLock.part, "connectorHoleClampLock.step")
export_stl(clampLock.part, "connectorHoleLockingPin.stl")
show_all()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
from ocp_vscode import *
from build123d import *
set_port(3939)
# Kennedy Pegboard hole width = 10 x 10 mm
# Hart to hart distance holes = 1-1/2" = 38.1 mm
tt = thickness_toolboard = 2.0
wc = width_connector = 20.0
tb = thickness_bevel = 2.5
teub = thickness_edge_until_board = 0.5
ttc = thickness_total_connector = 4.0
cw = clamp_width = 9.8
tc = thickness_clamp = 4.0
cbw = clamp_board_width = cw*2/3
dcr = depth_clamp_room = 1.8 # Made it a bit deeper so the securing pin stays beneath the surface
lcr = length_clamp_room = cw*0.25+2.4
wch = width_clamp_hole = cw/3
lch = length_clamp_hole = cw+0.2
# Make the connector
with BuildPart() as connector:
with BuildSketch() as connector_sk:
Circle(wc/2)
extrude(amount = ttc-teub)
# Generate a bevel
chamfer(connector.edges().group_by(Axis.Z)[-1], length = tb, length2 = tb)
# Extrude the last part of the connector
extrude(connector.faces().sort_by(Axis.Z)[-1], amount = teub)
# Make a hole for the security pin
with BuildSketch(connector.faces().sort_by(Axis.Z)[0]):
with Locations((cbw/2, 0)):
RectangleRounded(wch, lch, .5)
extrude(amount = -ttc, mode=Mode.SUBTRACT)
with BuildSketch(connector.faces().sort_by(Axis.Z)[0]):
RectangleRounded(lcr+1, lch, .5)
extrude(amount = -dcr, mode=Mode.SUBTRACT)
# Build the clamp on the backside
with BuildPart() as clamp:
with BuildSketch(connector.faces().sort_by(Axis.Z)[-1]) as sk_clamp:
with Locations((-cbw/6, 0)):
RectangleRounded(cbw, cw, .5)
extrude(amount = tt)
with BuildSketch(clamp.faces().sort_by(Axis.Z)[-1]) as sk_behindBoard:
with Locations((-cbw/4, 0)):
Rectangle(cw, cw)
extrude(amount = tc)
chamfer(clamp.edges().group_by(Axis.X)[0].sort_by(Axis.Z)[0], length = tc/5, length2 = cw-cbw-.01)
fillet(clamp.edges(Select.LAST).filter_by(Axis.Y)[0], .5)
fillet(clamp.edges().filter_by(Axis.Z), .5)
fillet(clamp.edges().filter_by(Axis.X)[0], .5)
# Put the two parts together
with BuildPart() as kbMulticonnector:
add(connector)
add(clamp)
export_stl(kbMulticonnector.part, "connectorWithClamp.stl")
show(kbMulticonnector)

Binary file not shown.

View File

@@ -2,14 +2,16 @@ from ocp_vscode import *
from build123d import *
set_port(3939)
tt = thickness_toolboard = 0.8
# Kennedy Pegboard hole width = 10 x 10 mm
# Hart to hart distance holes = 1-1/2" = 38.1 mm
tt = thickness_toolboard = 2.0
wc = width_connector = 20.0
tb = thickness_bevel = 2.5
teub = thickness_edge_until_board = 0.5
ttc = thickness_total_connector = 4.0
cw = clamp_width = 9.8
dcr = depth_clamp_room = 1.6
lcr = length_clamp_room = cw+5
lcr = length_clamp_room = cw+2.8
with BuildPart() as connector:
with BuildSketch() as connector_sk:

View File

@@ -0,0 +1,53 @@
from ocp_vscode import *
from build123d import *
set_port(3939)
# Kennedy Pegboard hole width = 10 x 10 mm
# Hart to hart distance holes = 1-1/2" = 38.1 mm
tt = thickness_toolboard = 2.0
dc = dia_connector = 20.0
tb = thickness_bevel = 2.5
teub = thickness_edge_until_board = 0.5
ttc = thickness_total_connector = 4.0
cw = clamp_width = 9.8
tc = thickness_clamp = 4.0
cbw = clamp_board_width = cw*2/3
dcr = depth_clamp_room = 1.8 # Made it a bit deeper so the securing pin stays beneath the surface
lcr = length_clamp_room = cw*0.25+2.4
wch = width_clamp_hole = cw/3
lch = length_clamp_hole = cw+0.2
with BuildPart() as connector:
# Build the multiconnector
with BuildSketch() as sk_connector:
Circle(dia_connector/2)
extrude(amount = thickness_total_connector-thickness_edge_until_board)
chamfer(connector.edges().group_by(Axis.Z)[-1], length = thickness_bevel, length2 = thickness_bevel)
extrude(connector.faces().sort_by(Axis.Z)[-1], amount = thickness_edge_until_board)
# Add the clamp to connect to the board
with BuildSketch(Plane.XY.offset(thickness_total_connector)) as sk_clamp:
with Locations((-clamp_board_width/4, 0)):
RectangleRounded(clamp_board_width, clamp_width, .5)
extrude(amount = thickness_toolboard)
with BuildSketch(Plane.XY.offset(thickness_total_connector+thickness_toolboard)) as sk_behindBoard:
with Locations((-clamp_board_width/2, 0)):
Rectangle(clamp_width, clamp_width)
extrude(amount = thickness_clamp)
chamfer(sk_behindBoard.edges().filter_by(GeomType.PLANE).sort_by(Axis.Z)[0], length = .5, length2 = 1)
# fillet(clamp.edges(), .5)
# chamfer(connector.faces().filter_by(GeomType.OTHER).sort_by(Axis.X)[-1].sort_by(Axis.Z)[0], length = 0.2, length2 = 0.1)
# Make a hole for the security pin
with BuildSketch(connector.faces().sort_by(Axis.Z)[0]):
with Locations((width_clamp_hole, 0)):
RectangleRounded(width_clamp_hole, length_clamp_hole, .75)
extrude(amount = -thickness_total_connector, mode=Mode.SUBTRACT)
with BuildSketch(connector.faces().sort_by(Axis.Z)[0]):
Rectangle(length_clamp_room, length_clamp_hole)
extrude(amount = -depth_clamp_room, mode=Mode.SUBTRACT)
#export_stl(connector.part, "connectorWithClamp.stl")
show_all()