From 26f82baa33a373cbc9f782d7ba4a8f88c14f78ca Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Sun, 22 May 2022 21:57:46 -0400 Subject: [PATCH] Export stl files for follow focus --- follow_focus.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/follow_focus.py b/follow_focus.py index 02600ae..04bae4f 100644 --- a/follow_focus.py +++ b/follow_focus.py @@ -18,10 +18,13 @@ fastener_height= 3.5 fastener_length= 20 fastener_h_spacing= .2 fastener_gap= .2 +hex_diameter= 8.5 +hex_depth= 4 # NEMA 17 stepper motor stepper_motor_size= 42.0 stepper_hole_width= 31.0 +stepper_mount_dia= 22.5 # Case part_thinkness= 20 @@ -74,7 +77,8 @@ support_x = (support_y-b)/slope lg_x = support_x-stepper_center[0] lg_y = support_y-stepper_center[1] -lg_radius = (math.sqrt(lg_x**2 + lg_y**2)-sg_teeth*mod/2) +sg_radius = sg_teeth*mod/2 +lg_radius = (math.sqrt(lg_x**2 + lg_y**2)-sg_radius) def findRodInter(n_x, n_y): p = Point(center_x, center_y) @@ -138,7 +142,7 @@ base = base.faces('<>Z[0]').workplane().center(stepper_center[0], -stepper_center[1])\ - .circle(22.5/2)\ + .circle(stepper_mount_dia/2)\ .pushPoints([(stepper_hole_radius*math.cos(math.radians(45+slant_degree)),\ stepper_hole_radius*math.sin(math.radians(45+slant_degree))),\ (stepper_hole_radius*math.cos(math.radians(135+slant_degree)),\ @@ -157,7 +161,7 @@ lid = lid.faces('>Z[0]').shell(.000001-wall_width) lid = lid.add(copy) lid = lid.faces('>Z[1]').workplane().center(stepper_center[0], -stepper_center[1])\ - .circle(5).extrude(lid_thicknesss-wall_width) + .circle(sg_radius+mod).extrude(lid_thicknesss-wall_width) lid = lid.faces('>Z[0]').workplane().circle(5/2).cutThruAll() base = base.faces('