diff --git a/follow_focus.py b/follow_focus.py index c29f670..943fd4c 100644 --- a/follow_focus.py +++ b/follow_focus.py @@ -9,10 +9,12 @@ slant_degree=15.0 thickness=20 rod_thickness=15.2 loop_thickness=1.5 +wall_width=1.6 stepper_motor_size=42 lid_thicknesss = 5 offset=9 part_thinkness=20 +gear_thinkness=10 gap = stepper_motor_size * math.sin(math.radians(slant_degree)) / math.sin(math.radians(90-slant_degree)) width = math.sqrt(gap**2 + stepper_motor_size**2 - 2*gap*stepper_motor_size*math.cos(math.radians(90))) @@ -72,7 +74,7 @@ base = createOutline(part_thinkness) # Shell copy = base.faces('>>Z[0]').workplane().center(0, -offset-loop_thickness).polarLine(stepper_motor_size, slant_degree).polarLine(-2*stepper_motor_size, 90+slant_degree).hLine(-2*stepper_motor_size).close().cutThruAll() copy = copy.faces('+Z').workplane().center(0, -offset-loop_thickness).polarLine(2*stepper_motor_size,-slant_degree).vLine(stepper_motor_size).hLine(-2*stepper_motor_size).close().cutBlind(-lid_thicknesss) -base = base.faces('+Z').shell(-1.6) +base = base.faces('+Z').shell(-wall_width) base = base.add(copy) base = base.faces('<>Z[0]').workplane().center(stepper_center[0], -stepper_center[1]).circle(22.5/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)),stepper_hole_radius*math.sin(math.radians(135+slant_degree))),(stepper_hole_radius*math.cos(math.radians(225+slant_degree)),stepper_hole_radius*math.sin(math.radians(225+slant_degree))),(stepper_hole_radius*math.cos(math.radians(315+slant_degree)),stepper_hole_radius*math.sin(math.radians(315+slant_degree)))]).circle(3/2).cutBlind(-1.6) +base = base.faces('>>Z[0]').workplane().center(stepper_center[0], -stepper_center[1]).circle(22.5/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)),stepper_hole_radius*math.sin(math.radians(135+slant_degree))),(stepper_hole_radius*math.cos(math.radians(225+slant_degree)),stepper_hole_radius*math.sin(math.radians(225+slant_degree))),(stepper_hole_radius*math.cos(math.radians(315+slant_degree)),stepper_hole_radius*math.sin(math.radians(315+slant_degree)))]).circle(3/2).cutBlind(-wall_width) lid = lid.cut(base) +copy = lid.faces('>>Z[0]').workplane().center(0, -offset-loop_thickness).polarLine(stepper_motor_size*2, slant_degree).polarLine(-2*stepper_motor_size, 90+slant_degree).hLine(-3*stepper_motor_size).close().cutThruAll() +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]-offset-loop_thickness).circle(5).extrude(lid_thicknesss-wall_width) +lid = lid.faces('>Z[0]').workplane().circle(5/2).cutThruAll() # Render show_object(base, name='Follow Focus Base')