Compare commits
No commits in common. "da8b5dee5c3432b67a34d0d7298e10d0653390b9" and "48b61652da8bbebe4556ca08cf0bfe08649db514" have entirely different histories.
da8b5dee5c
...
48b61652da
@ -17,7 +17,6 @@ fastener_width= 11
|
||||
fastener_height= 3.5
|
||||
fastener_length= 20
|
||||
fastener_h_spacing= .2
|
||||
fastener_gap= .2
|
||||
|
||||
# NEMA 17 stepper motor
|
||||
stepper_motor_size= 42.0
|
||||
@ -46,19 +45,19 @@ sg_teeth= 11
|
||||
# Other
|
||||
mount_gap= 2
|
||||
support_radius= 11/2
|
||||
end_y= -4.3
|
||||
|
||||
# Calculated values
|
||||
fastener_hole_depth = tab_height-2
|
||||
lid_thicknesss = (part_thinkness-gear_thinkness)/2
|
||||
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)))
|
||||
end_x = gap+stepper_motor_size-5
|
||||
outer_ring_diameter = rod_diameter+2*loop_width
|
||||
center_x = end_x-math.cos(math.radians(loop_angle))*outer_ring_diameter/2
|
||||
center_y = end_y-math.sin(math.radians(loop_angle))*outer_ring_diameter/2
|
||||
end_x=gap+stepper_motor_size-5
|
||||
end_y=-4.3
|
||||
outer_ring_diameter=rod_diameter+2*loop_width
|
||||
center_x=end_x-math.cos(math.radians(loop_angle))*outer_ring_diameter/2
|
||||
center_y=end_y-math.sin(math.radians(loop_angle))*outer_ring_diameter/2
|
||||
# Stepper motor mount points
|
||||
stepper_hole_radius = stepper_hole_width/2*math.sqrt(2)
|
||||
stepper_hole_radius=stepper_hole_width/2*math.sqrt(2)
|
||||
stepper_center = cq.Workplane('XY').lineTo(0, offset)\
|
||||
.polarLine(stepper_motor_size/2, 90-slant_degree)\
|
||||
.polarLine(stepper_motor_size/2, -slant_degree)\
|
||||
@ -72,8 +71,8 @@ b = e[1] - slope*e[0]
|
||||
support_y = end[1]-support_radius
|
||||
support_x = (support_y-b)/slope
|
||||
|
||||
lg_x = support_x-stepper_center[0]
|
||||
lg_y = support_y-stepper_center[1]
|
||||
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)
|
||||
|
||||
def findRodInter(n_x, n_y):
|
||||
@ -173,9 +172,8 @@ base = base.faces('<<Y[-1]').workplane().center(-5,0).circle(6.5/2).cutBlind(-su
|
||||
base = base.faces('<<Y[-1]').workplane().circle(8.5/2).cutBlind(-support_radius-mount_gap)
|
||||
|
||||
# Fastener
|
||||
base = base.faces('<<Y[-1]').workplane().circle(fastener_width/2+fastener_gap).cutBlind(-fastener_hole_depth)
|
||||
fastener = base.faces('<<Y[-4]').workplane().circle(fastener_width/2)\
|
||||
.extrude(fastener_hole_depth+fastener_h_spacing+fastener_height, combine=False)
|
||||
base = base.faces('<<Y[-1]').workplane().circle((fastener_width+1)/2).cutBlind(-fastener_hole_depth)
|
||||
fastener = base.faces('<<Y[-4]').workplane().circle(fastener_width/2).extrude(fastener_hole_depth+fastener_h_spacing+fastener_height, combine=False)
|
||||
fastener = fastener.faces('<<Y[-1]').workplane().center(-fastener_length,0)\
|
||||
.line(20,-fastener_width/2)\
|
||||
.vLine(fastener_width)\
|
||||
|
Loading…
x
Reference in New Issue
Block a user