diff --git a/KennedyPegboard/Toolholders/multiconnect/basicBackSlot.py b/KennedyPegboard/Toolholders/multiconnect/basicBackSlot.py index 282168c..3e0e1c4 100644 --- a/KennedyPegboard/Toolholders/multiconnect/basicBackSlot.py +++ b/KennedyPegboard/Toolholders/multiconnect/basicBackSlot.py @@ -37,35 +37,31 @@ def one_clip(): 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) 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 with BuildPart() as raster: - last_clip = None for i in range(number_clips_horizontal): for j in range(number_clips_vertical): - clip = one_clip() # Put the clips on the right locations with Locations((i * hdhh, j * hdhh, 0)): + clip = one_clip() 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) - make_face() - mirror(about=Plane.YZ) - extrude(until=Until.NEXT) - last_clip = clip - break + # Connect the clips together + one_extrusion = extrusion_clip() + add(one_extrusion) #export_stl(backSlot.part, "backSlot.stl") +#export_step(backSlot.part, "backSlot.step") show_all()