M3 dimensions
This commit is contained in:
parent
3a60c511eb
commit
ad09e4c3a0
@ -1,7 +1,7 @@
|
|||||||
import cadquery as cq
|
import cadquery as cq
|
||||||
from cq_gears import SpurGear
|
from cq_gears import SpurGear
|
||||||
|
|
||||||
import copy, math
|
import math
|
||||||
|
|
||||||
from shapely.geometry import LineString
|
from shapely.geometry import LineString
|
||||||
from shapely.geometry import Point
|
from shapely.geometry import Point
|
||||||
@ -17,6 +17,12 @@ offset=9
|
|||||||
part_thinkness=20
|
part_thinkness=20
|
||||||
gear_thinkness=10
|
gear_thinkness=10
|
||||||
large_gear_diameter=8.5
|
large_gear_diameter=8.5
|
||||||
|
m3_tap=2.5
|
||||||
|
m3_head_diameter=6
|
||||||
|
m3_head_depth=3
|
||||||
|
m3_passthrough=3.5
|
||||||
|
#m_hole_diameter=6
|
||||||
|
#m_hole_depth=3
|
||||||
|
|
||||||
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)))
|
||||||
@ -96,18 +102,16 @@ lid = lid.faces('>Z[1]').workplane().center(stepper_center[0], -stepper_center[1
|
|||||||
lid = lid.faces('>Z[0]').workplane().circle(5/2).cutThruAll()
|
lid = lid.faces('>Z[0]').workplane().circle(5/2).cutThruAll()
|
||||||
|
|
||||||
gear_gap=0.2
|
gear_gap=0.2
|
||||||
base = base.faces('<Z[1]').workplane().center(21,20.15).circle(26.5).cutBlind(-gear_thinkness-gear_gap).tag('test')
|
base = base.faces('<Z[1]').workplane().center(21,20.15).circle(26.5).cutBlind(-gear_thinkness-gear_gap)
|
||||||
t=11/2
|
t=11/2
|
||||||
base = base.faces('<Z[2]').workplane().hLine(t, forConstruction=True).threePointArc((-t,-t/2),(0,t)).polarLine(t, -slant_degree).close().extrude(-lid_thicknesss+wall_width)
|
base = base.faces('<Z[2]').workplane().hLine(t, forConstruction=True).threePointArc((-t,-t/2),(0,t)).polarLine(t, -slant_degree).close().extrude(-lid_thicknesss+wall_width)
|
||||||
gear_offset=0.5
|
gear_offset=0.5
|
||||||
base = base.faces('<Z[2]').workplane().circle(large_gear_diameter/2-gear_offset).extrude(gear_thinkness/2)
|
base = base.faces('<Z[2]').workplane().circle(large_gear_diameter/2-gear_offset).extrude(gear_thinkness/2)
|
||||||
base = base.faces('<Z[2]').workplane().circle(2).cutBlind(-part_thinkness/2+wall_width)
|
base = base.faces('<Z[2]').workplane().circle(m3_tap/2).cutBlind(-part_thinkness/2+wall_width)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Threaded insert
|
# Threaded insert
|
||||||
base = base.faces('<<Y[-1]').workplane().center(-5,0).circle(6.5/2).cutBlind(-t-mount_gap*2-6)
|
base = base.faces('<<Y[-1]').workplane().center(-5,0).circle(6.5/2).cutBlind(-t-mount_gap*2-6)
|
||||||
base = base.faces('<<Y[-1]').workplane().circle(8.5/2).cutBlind(-t-mount_gap).tag('test')
|
base = base.faces('<<Y[-1]').workplane().circle(8.5/2).cutBlind(-t-mount_gap)
|
||||||
|
|
||||||
# Fastener
|
# Fastener
|
||||||
fastener_width = 11
|
fastener_width = 11
|
||||||
@ -123,15 +127,13 @@ fastener = fastener.faces('<<Y[-6]').workplane().circle(5/2).cutThruAll()
|
|||||||
lid = lid.faces('>Z[0]').workplane().center(21,-20.15).hLine(t, forConstruction=True).threePointArc((-t,t/2),(0,-t)).polarLine(t, slant_degree).close().extrude(-lid_thicknesss+wall_width)
|
lid = lid.faces('>Z[0]').workplane().center(21,-20.15).hLine(t, forConstruction=True).threePointArc((-t,t/2),(0,-t)).polarLine(t, slant_degree).close().extrude(-lid_thicknesss+wall_width)
|
||||||
lid = lid.faces('>Z[0]').workplane().circle(large_gear_diameter/2-gear_offset).extrude(gear_thinkness/2)
|
lid = lid.faces('>Z[0]').workplane().circle(large_gear_diameter/2-gear_offset).extrude(gear_thinkness/2)
|
||||||
lid = lid.faces('>Z[0]').workplane().circle(2).cutThruAll()
|
lid = lid.faces('>Z[0]').workplane().circle(2).cutThruAll()
|
||||||
m_hole_diameter=6
|
lid = lid.faces('<Z[0]').workplane().circle(m3_head_diameter/2).cutBlind(-m3_head_depth)
|
||||||
m_hole_depth=3
|
|
||||||
lid = lid.faces('<Z[0]').workplane().circle(m_hole_diameter/2).cutBlind(-m_hole_depth)
|
|
||||||
|
|
||||||
# Mount Hole
|
# Lid Holes
|
||||||
lid = lid.faces('<Z[0]').workplane().center(-stepper_motor_size+wall_width,-stepper_motor_size+offset/2-loop_thickness).circle(3.5/2).cutThruAll()
|
lid = lid.faces('<Z[0]').workplane().center(-stepper_motor_size+wall_width,-stepper_motor_size+offset/2-loop_thickness).circle(m3_passthrough/2).cutThruAll()
|
||||||
drill = lid.faces('<Z[0]').workplane().circle(2.5/2).extrude(-part_thinkness+wall_width, combine=False)
|
drill = lid.faces('<Z[0]').workplane().circle(m3_tap/2).extrude(-part_thinkness+wall_width, combine=False)
|
||||||
base = base.cut(drill)
|
base = base.cut(drill)
|
||||||
lid = lid.faces('<Z[0]').workplane().circle(m_hole_diameter/2).cutBlind(-m_hole_depth)
|
lid = lid.faces('<Z[0]').workplane().circle(m3_head_diameter/2).cutBlind(-m3_head_depth)
|
||||||
|
|
||||||
# Gears
|
# Gears
|
||||||
mod=0.8
|
mod=0.8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user