Fastener height spacing
This commit is contained in:
parent
9462e22b3c
commit
48b61652da
@ -7,45 +7,47 @@ from shapely.geometry import LineString
|
|||||||
from shapely.geometry import Point
|
from shapely.geometry import Point
|
||||||
|
|
||||||
# M3 screws for attaching lid
|
# M3 screws for attaching lid
|
||||||
m3_tap=2.5
|
m3_tap= 2.5
|
||||||
m3_head_diameter=6
|
m3_head_diameter= 6
|
||||||
m3_head_depth=3
|
m3_head_depth= 3
|
||||||
m3_passthrough=3.5
|
m3_passthrough= 3.5
|
||||||
|
|
||||||
# Fastener dimensions
|
# Fastener dimensions
|
||||||
fastener_width = 11
|
fastener_width= 11
|
||||||
fastener_height = 3.5
|
fastener_height= 3.5
|
||||||
fastener_length = 20
|
fastener_length= 20
|
||||||
|
fastener_h_spacing= .2
|
||||||
|
|
||||||
# NEMA 17 stepper motor
|
# NEMA 17 stepper motor
|
||||||
stepper_motor_size=42.0
|
stepper_motor_size= 42.0
|
||||||
stepper_hole_width=31.0
|
stepper_hole_width= 31.0
|
||||||
|
|
||||||
# Case
|
# Case
|
||||||
part_thinkness=20
|
part_thinkness= 20
|
||||||
outer_fillets=2.5
|
outer_fillets= 2.5
|
||||||
slant_degree=15.0
|
slant_degree= 15.0
|
||||||
wall_width=1.6
|
wall_width= 1.6
|
||||||
loop_width=wall_width
|
loop_width= wall_width
|
||||||
loop_angle=40
|
loop_angle= 40
|
||||||
rod_diameter=15.2
|
rod_diameter= 15.2
|
||||||
offset=9
|
offset= 9
|
||||||
tab_height=6
|
tab_height= 6
|
||||||
tab_width=25
|
tab_width= 25
|
||||||
|
|
||||||
# Gears
|
# Gears
|
||||||
mod=0.8
|
mod= 0.8
|
||||||
gear_gap=0.2
|
gear_gap= 0.2
|
||||||
gear_offset=0.5
|
gear_offset= 0.5
|
||||||
large_gear_diameter=8.5
|
large_gear_diameter= 8.5
|
||||||
gear_thinkness=10
|
gear_thinkness= 10
|
||||||
sg_teeth=11
|
sg_teeth= 11
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
mount_gap=2
|
mount_gap= 2
|
||||||
support_radius=11/2
|
support_radius= 11/2
|
||||||
|
|
||||||
# Calculated values
|
# Calculated values
|
||||||
|
fastener_hole_depth = tab_height-2
|
||||||
lid_thicknesss = (part_thinkness-gear_thinkness)/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))
|
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)))
|
width = math.sqrt(gap**2 + stepper_motor_size**2 - 2*gap*stepper_motor_size*math.cos(math.radians(90)))
|
||||||
@ -170,8 +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)
|
base = base.faces('<<Y[-1]').workplane().circle(8.5/2).cutBlind(-support_radius-mount_gap)
|
||||||
|
|
||||||
# Fastener
|
# Fastener
|
||||||
base = base.faces('<<Y[-1]').workplane().circle((fastener_width+1)/2).cutBlind(-4)
|
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(4.5+fastener_height, combine=False)
|
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)\
|
fastener = fastener.faces('<<Y[-1]').workplane().center(-fastener_length,0)\
|
||||||
.line(20,-fastener_width/2)\
|
.line(20,-fastener_width/2)\
|
||||||
.vLine(fastener_width)\
|
.vLine(fastener_width)\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user