From 2a430dc28a36af445a5f1942869a635d7087cb8c Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Mon, 21 Sep 2026 22:45:39 -0400 Subject: [PATCH] Update stopper and add a PTFE guide into extrueder --- space_pi_se_PTFE_guide.py | 73 +++++++++++++++++++++++++++++++++++++ space_pi_se_PTFE_stopper.py | 18 +++++++-- 2 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 space_pi_se_PTFE_guide.py diff --git a/space_pi_se_PTFE_guide.py b/space_pi_se_PTFE_guide.py new file mode 100644 index 0000000..ff54f22 --- /dev/null +++ b/space_pi_se_PTFE_guide.py @@ -0,0 +1,73 @@ +# /// script +# requires-python = ">=3.14" +# dependencies = ["ocp_vscode", "build123d"] +# /// + +from build123d import * +from ocp_vscode import * + +### Dimensions ### +bolt_spacing = 17 * MM +bolt_hole_diameter = 4 * MM +z_rod_diameter = 10 * MM +buffer = 4 * MM +bolt_to_PTFE_offset = 2 * MM +base_length = 30 * MM +bolt_to_holder_offset = 20 * MM +wall_thickness = 2 * MM +PTFE_radius = 2.5 * MM +holder_length = 14 * MM + +################### + +with BuildPart() as guide: + with BuildSketch() as sketch: + Rectangle( + 2 * buffer + base_length, + 2 * buffer + bolt_spacing + bolt_hole_diameter, + align=(Align.MIN, Align.MIN), + ) + with Locations( + (buffer + bolt_hole_diameter / 2.0, buffer + bolt_hole_diameter / 2.0), + ( + buffer + bolt_hole_diameter / 2.0, + buffer + bolt_hole_diameter / 2.0 + bolt_spacing, + ), + ): + Circle(radius=bolt_hole_diameter / 2.0, mode=Mode.SUBTRACT) + + with Locations( + ( + buffer + bolt_hole_diameter / 2.0, + buffer + bolt_spacing / 2.0 + bolt_hole_diameter / 2.0, + ), + ): + Circle(radius=z_rod_diameter / 2.0, mode=Mode.SUBTRACT) + Rectangle( + z_rod_diameter / 2.0 + buffer, + z_rod_diameter, + mode=Mode.SUBTRACT, + align=(Align.MAX, Align.CENTER), + ) + extrude(amount=wall_thickness) + + with BuildSketch(Plane.YZ.offset(buffer + bolt_to_holder_offset)) as sketch: + with Locations( + ( + buffer + bolt_hole_diameter / 2.0 + bolt_to_PTFE_offset, + PTFE_radius + wall_thickness, + ), + ): + Circle( + radius=PTFE_radius + wall_thickness, align=(Align.CENTER, Align.CENTER) + ) + Circle( + radius=PTFE_radius, + align=(Align.CENTER, Align.CENTER), + mode=Mode.SUBTRACT, + ) + + extrude(amount=holder_length) + + show(guide) +export_stl(guide.part, "guide.stl") diff --git a/space_pi_se_PTFE_stopper.py b/space_pi_se_PTFE_stopper.py index 15d5a44..f76b70b 100644 --- a/space_pi_se_PTFE_stopper.py +++ b/space_pi_se_PTFE_stopper.py @@ -23,14 +23,24 @@ with BuildPart() as stopper: Circle(diameter_at_hole / 2.0 + 0.5 * MM) Circle(diameter_at_hole / 2.0, mode=Mode.SUBTRACT) extrude(amount=ptfe_length) - offset = ptfe_length + washer_thickness - with BuildSketch(Plane.XY.offset(offset)) as sketch: + z_offset = ptfe_length + washer_thickness + with BuildSketch(Plane.XY.offset(z_offset)) as sketch: Circle(diameter_at_hole / 2.0 + 0.5 * MM) Circle(diameter_at_hole / 2.0, mode=Mode.SUBTRACT) - offset += filament_length - with BuildSketch(Plane.XY.offset(offset)) as sketch: + z_offset += filament_length + with BuildSketch(Plane.XY.offset(z_offset)) as sketch: Circle(diameter_at_filament / 2.0 + 0.5 * MM) Circle(diameter_at_filament / 2.0, mode=Mode.SUBTRACT) loft() + with BuildSketch(Plane.XZ) as sketch: + with Locations((0, z_offset)): + with BuildLine(): + l1 = RadiusArc( + (diameter_at_filament / 2.0, 0), (diameter_at_hole / 2, 1), radius=1 + ) + offset(amount=0.5 * MM, side=Side.RIGHT) + make_face() + revolve(axis=Axis.Z) show(stopper) + export_stl(stopper.part, "stopper.stl")