Verticale connectie gelukt
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
# Add a straight part to it
|
||||||
|
def extrusion_clip():
|
||||||
|
with BuildPart() as extrusion:
|
||||||
|
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
|
||||||
|
|
||||||
# Generate a raster of clips
|
# Generate a raster of clips
|
||||||
with BuildPart() as raster:
|
with BuildPart() as raster:
|
||||||
last_clip = None
|
|
||||||
for i in range(number_clips_horizontal):
|
for i in range(number_clips_horizontal):
|
||||||
for j in range(number_clips_vertical):
|
for j in range(number_clips_vertical):
|
||||||
clip = one_clip()
|
|
||||||
# Put the clips on the right locations
|
# Put the clips on the right locations
|
||||||
with Locations((i * hdhh, j * hdhh, 0)):
|
with Locations((i * hdhh, j * hdhh, 0)):
|
||||||
|
clip = one_clip()
|
||||||
add(clip)
|
add(clip)
|
||||||
# Connect the clips together
|
# Connect the clips together
|
||||||
while True:
|
one_extrusion = extrusion_clip()
|
||||||
if last_clip is not None:
|
add(one_extrusion)
|
||||||
with BuildSketch(Plane.XZ) as sk_connect:
|
|
||||||
with BuildLine(Plane.XZ) as ln_connect:
|
|
||||||
Polyline(pts)
|
|
||||||
make_face()
|
|
||||||
mirror(about=Plane.YZ)
|
|
||||||
extrude(until=Until.NEXT)
|
|
||||||
last_clip = clip
|
|
||||||
break
|
|
||||||
|
|
||||||
#export_stl(backSlot.part, "backSlot.stl")
|
#export_stl(backSlot.part, "backSlot.stl")
|
||||||
|
#export_step(backSlot.part, "backSlot.step")
|
||||||
show_all()
|
show_all()
|
||||||
|
|||||||
Reference in New Issue
Block a user