kleine aanpassingen
This commit is contained in:
@@ -7,6 +7,7 @@ set_port(3939)
|
||||
number_clips_horizontal = 3
|
||||
number_clips_vertical = 3
|
||||
|
||||
|
||||
# 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
|
||||
@@ -37,30 +38,49 @@ def one_clip():
|
||||
Polyline(pts)
|
||||
make_face()
|
||||
revolve(revolution_arc=180.0, axis=Axis.Z)
|
||||
return backSlot.part
|
||||
|
||||
# Add a straight part to it
|
||||
def extrusion_clip():
|
||||
with BuildPart() as extrusion:
|
||||
# Add a straight part to it
|
||||
with BuildSketch(Plane.XZ) as sk_extrusion:
|
||||
with BuildLine(Plane.XZ) as ln_extrusion:
|
||||
Polyline(pts)
|
||||
make_face()
|
||||
mirror(about=Plane.YZ)
|
||||
extrude(amount = el)
|
||||
return extrusion.part
|
||||
return backSlot.part
|
||||
|
||||
def connection_clip():
|
||||
with BuildPart() as connection:
|
||||
with BuildSketch(Plane.XZ) as sk_connection:
|
||||
Rectangle(wmh+4, 2)
|
||||
extrude(amount = 30)
|
||||
return connection.part
|
||||
|
||||
# Generate a raster of clips
|
||||
with BuildPart() as raster:
|
||||
for i in range(number_clips_horizontal):
|
||||
for j in range(number_clips_vertical):
|
||||
# clip = one_clip()
|
||||
# one_connection = connection_clip()
|
||||
# for i in range(number_clips_horizontal):
|
||||
# for j in range(number_clips_vertical):
|
||||
# Put the clips on the right locations
|
||||
with Locations((i * hdhh, j * hdhh, 0)):
|
||||
clip = one_clip()
|
||||
add(clip)
|
||||
# Connect the clips together
|
||||
one_extrusion = extrusion_clip()
|
||||
add(one_extrusion)
|
||||
# with Locations((i * hdhh, j * hdhh, 0)):
|
||||
# with GridLocations(x_spacing = hdhh, y_spacing = hdhh, x_count = number_clips_horizontal, y_count = number_clips_vertical):
|
||||
with GridLocations(x_spacing = hdhh, y_spacing = hdhh, x_count = number_clips_horizontal, y_count = number_clips_vertical):
|
||||
# Make a polyline sketch and revolve it 180 degrees
|
||||
with BuildSketch(Plane.XZ) as sk_backSlot:
|
||||
with BuildLine(Plane.XZ) as ln_backSlot:
|
||||
Polyline(pts)
|
||||
make_face()
|
||||
revolve(revolution_arc=180.0, axis=Axis.Z)
|
||||
# Add a straight part to it
|
||||
with BuildSketch(Plane.XZ) as sk_extrusion:
|
||||
with BuildLine(Plane.XZ) as ln_extrusion:
|
||||
Polyline(pts)
|
||||
make_face()
|
||||
mirror(about=Plane.YZ)
|
||||
extrude(amount = el)
|
||||
# Connect the clips together
|
||||
# with Locations((i * hdhh, j * hdhh - el, 1)):
|
||||
# connection_clip()
|
||||
# print(clip, one_connection)
|
||||
|
||||
#export_stl(backSlot.part, "backSlot.stl")
|
||||
#export_step(backSlot.part, "backSlot.step")
|
||||
|
||||
Reference in New Issue
Block a user