From 3a9e2e5096d03421f94d0f8108e770c2ef0b3c64 Mon Sep 17 00:00:00 2001 From: Reed Krantz Date: Mon, 20 Jul 2026 22:53:06 -0500 Subject: [PATCH] feat: angle the track on the drive_shaft_mount to make it more printable --- cad/build.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cad/build.py b/cad/build.py index 851991c..4a90c59 100644 --- a/cad/build.py +++ b/cad/build.py @@ -1,4 +1,5 @@ # pyright: reportUnusedCallResult=false, reportWildcardImportFromLibrary=false +from math import radians, sin from build123d import * def build_drive_shaft_mount(): @@ -19,8 +20,9 @@ def build_drive_shaft_mount(): screw_head_depth = 5 screw_body_diameter = 5 - track_width = 6.2 - track_height = 1.8 + track_width = 6.1 + track_height = 1.4 + track_angle = 30 assert (bearing_offset - bearing_diameter / 2) > 0 assert (core_width - bearing_diameter) > 0 @@ -82,7 +84,9 @@ def build_drive_shaft_mount(): Triangle(A=90, b=1, c=1) extrude(amount=-((thickness / 2) + (bearing_height / 2)), mode=Mode.SUBTRACT) - Box(core_width + (screw_blocks_width * 2), track_width, track_height, (90, 0, 0), (Align.CENTER, Align.CENTER, Align.MIN)) + with BuildPart() as track: + Box(core_width + (screw_blocks_width * 2), track_width + ((sin(radians(track_angle))/sin(radians(90-track_angle))) * track_height * 2) - 0.012, track_height, (90, 0, 0), (Align.CENTER, Align.CENTER, Align.MIN)) + chamfer(track.edges().filter_by(Axis.X).sort_by(Axis.Y)[:2], track_height - 0.01, angle=track_angle) with Locations(drive_shaft_mount.faces().filter_by(Plane.XZ).sort_by(Axis.Y)[-2:]): CounterBoreHole(screw_body_diameter / 2, screw_head_diameter / 2, screw_head_depth)