Verticale connectie gelukt

This commit is contained in:
2025-01-09 09:19:38 +01:00
parent 917f4a4ebd
commit 5091cc23a4

View File

@@ -37,35 +37,31 @@ def one_clip():
Polyline(pts) Polyline(pts)
make_face() make_face()
revolve(revolution_arc=180.0, axis=Axis.Z) 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)
return backSlot.part return backSlot.part
# Generate a raster of clips # Add a straight part to it
with BuildPart() as raster: def extrusion_clip():
last_clip = None with BuildPart() as extrusion:
for i in range(number_clips_horizontal): with BuildSketch(Plane.XZ) as sk_extrusion:
for j in range(number_clips_vertical): with BuildLine(Plane.XZ) as ln_extrusion:
clip = one_clip()
# Put the clips on the right locations
with Locations((i * hdhh, j * hdhh, 0)):
add(clip)
# Connect the clips together
while True:
if last_clip is not None:
with BuildSketch(Plane.XZ) as sk_connect:
with BuildLine(Plane.XZ) as ln_connect:
Polyline(pts) Polyline(pts)
make_face() make_face()
mirror(about=Plane.YZ) mirror(about=Plane.YZ)
extrude(until=Until.NEXT) extrude(amount = el)
last_clip = clip return extrusion.part
break
# Generate a raster of clips
with BuildPart() as raster:
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)
#export_stl(backSlot.part, "backSlot.stl") #export_stl(backSlot.part, "backSlot.stl")
#export_step(backSlot.part, "backSlot.step")
show_all() show_all()