import sand3d as s3d
def wheel_dolly():
base=s3d.at(chassis(),x=-98,y=-13.5,z=43)
a=s3d.at(caster_fork(),x=-385,y=182.5,z=45)
b=s3d.at(caster_fork(wheel_joint=&class="tok-comment">#39;joint_wheel_01_joint_0039;),x=-385,y=182.5,z=45)
b=s3d.transform(s3d.copy(b),mirror=&class="tok-comment">#39;x39;,x=-196)
c=s3d.at(end_fork(),x=-385,y=-209,z=45)
e=s3d.at(end_fork(wheel_joint=&class="tok-comment">#39;joint_wheel_02_joint_0039;),x=-385,y=-209,z=45)
e=s3d.transform(s3d.copy(e),mirror=&class="tok-comment">#39;x39;,x=-196)
slide=s3d.at(sliding_beam(),x=74.5,y=172,z=48)
arm=s3d.at(lifting_linkage(),x=86.5,y=87,z=80)
s3d.joint(&class="tok-comment">#39;joint_wheelHolder_04_joint_00class="tok-string">39;,a,s3d.local(base,x=-282,y=196,z=88),kind=39;continuousclass="tok-string">39;,axis=39;+Z39;)
s3d.joint(&class="tok-comment">#39;joint_wheelHolder_01_joint_00class="tok-string">39;,b,s3d.local(base,x=282,y=196,z=88),kind=39;continuousclass="tok-string">39;,axis=39;+Z39;)
s3d.joint(&class="tok-comment">#39;joint_wheelHolder_03_joint_00class="tok-string">39;,c,s3d.local(base,x=-282,y=-195.5,z=88),kind=39;continuousclass="tok-string">39;,axis=39;+Z39;)
s3d.joint(&class="tok-comment">#39;joint_wheelHolder_02_joint_00class="tok-string">39;,e,s3d.local(base,x=282,y=-195.5,z=88),kind=39;continuousclass="tok-string">39;,axis=39;+Z39;)
s3d.joint(&class="tok-comment">#39;joint_slider_01_joint_00class="tok-string">39;,slide,s3d.local(base,x=173,y=-116.5,z=23),kind=39;prismaticclass="tok-string">39;,axis=39;+Y39;,range=(-509.5,0))
s3d.joint(&class="tok-comment">#39;joint_arm_01_joint_00class="tok-string">39;,arm,s3d.local(base,x=185,y=-107.5,z=61),axis=39;+X39;,range=(0,35))
return s3d.assembly(&class="tok-comment">#39;wheel_dolly39;,base,a,b,c,e,slide,arm)
def chassis(w=608,d=461,h=119,rail_l=320,rail_d=70,rail_x=-17,rail_y=195.5,rail_z=47,beam_x=173,beam_w=50,beam_h=50,wall=3,rib=3,rod_x=239,rod_z=68,rod_end=72):
beam=s3d.box(&class="tok-comment">#39;crossbeam39;,w=beam_w,d=d,h=beam_h)
beam=s3d.at(s3d.shell(beam,t=wall,open=&class="tok-comment">#39;+Y -Y39;),x=beam_x)
solids=[beam]
for y in (-rail_y,rail_y):
rail=s3d.at(s3d.cylinder(&class="tok-comment">#39;support39;,d=rail_d-rib,h=rail_l),x=rail_x-rail_l/2,y=y,z=rail_z,ry=90)
ribs=s3d.at(s3d.cylinder(&class="tok-comment">#39;raised_rib39;,d=rib,h=rail_l),on=s3d.ring(n=12,r=(rail_d-rib)/2))
ribs=s3d.at(s3d.group(&class="tok-comment">#39;ribs39;,ribs),x=rail_x-rail_l/2,y=y,z=rail_z,ry=90)
solids.extend([rail,ribs])
for side in (-1,1):
path=[(side*143,y,rail_z),(side*202,y,rail_z),(side*231,y,95),(side*282,y,95)]
solids.append(s3d.sweep(&class="tok-comment">#39;end_bracket39;,s3d.rect(w=8,d=34),path))
rod=s3d.wire(&class="tok-comment">#39;connecting_rod39;,path=[(beam_x+beam_w/2,-rod_end,beam_h),(rod_x,-rod_end,rod_z),(rod_x,rod_end,rod_z),(beam_x+beam_w/2,rod_end,beam_h)],d=8,fillet=8)
solids.append(rod)
root=s3d.group(&class="tok-comment">#39;chassis39;,solids)
s3d.material(root,kind=&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#666c7039;)
return root
def caster_fork(w=68,d=61,h=92,t=8,wheel_joint=&class="tok-comment">#39;joint_wheel_04_joint_0039;):
fork=fork_shape(w=w,d=d,h=h,t=t)
wheel=s3d.at(caster_wheel(),x=-17,y=-1.5,z=-45)
s3d.joint(wheel_joint,wheel,s3d.local(fork,x=-17,y=-1.5,z=17),kind=&class="tok-comment">#39;continuousclass="tok-string">39;,axis=39;+Y39;)
return s3d.group(&class="tok-comment">#39;caster_fork39;,fork,wheel)
def fork_shape(w,d,h,t):
plate=s3d.at(s3d.cylinder(&class="tok-comment">#39;swivel_plate39;,d=d,h=t),x=5,z=h-t)
profile=s3d.poly(pts=[(-17,0),(-29,7),(-31,23),(-28,h-t),(w/2,h-t),(w/2,h-19),(13,h-32),(-6,8)],fillet=4)
cheek=s3d.at(s3d.extrude(&class="tok-comment">#39;fork_cheek39;,profile,h=t),y=d/2-t,z=4,rx=90)
other=s3d.transform(s3d.copy(cheek),y=-d+t*2)
fork=s3d.group(&class="tok-comment">#39;fork39;,plate,cheek,other)
s3d.material(fork,kind=&class="tok-comment">#39;steelclass="tok-string">39;,color=39;#8a909439;)
return fork
def caster_wheel(w=124,d=38,h=124):
return s3d.group(&class="tok-comment">#39;caster_wheel39;,wheel_shape(w=w,d=d))
def wheel_shape(w,d):
rim=s3d.tube(&class="tok-comment">#39;tread39;,d=w,d_in=w-15,h=d)
rim=s3d.fillet(rim,r=2)
web=s3d.at(s3d.cylinder(&class="tok-comment">#39;recessed_web39;,d=w-10,h=d/3),z=d/3)
hub=s3d.cylinder(&class="tok-comment">#39;hub39;,d=43,h=d)
wheel=s3d.at(s3d.join(rim,web,hub),y=d/2,z=w/2,rx=90)
s3d.material(wheel,kind=&class="tok-comment">#39;rubberclass="tok-string">39;,color=39;#30343839;)
return wheel
def end_fork(w=68,d=60,h=92,t=8,wheel_joint=&class="tok-comment">#39;joint_wheel_03_joint_0039;):
fork=fork_shape(w=w,d=d,h=h,t=t)
wheel=s3d.at(end_wheel(),x=-17,y=0.5,z=-45)
s3d.joint(wheel_joint,wheel,s3d.local(fork,x=-17,y=1,z=17),kind=&class="tok-comment">#39;continuousclass="tok-string">39;,axis=39;+Y39;)
return s3d.group(&class="tok-comment">#39;end_fork39;,fork,wheel)
def end_wheel(w=124,d=39,h=124):
return s3d.group(&class="tok-comment">#39;end_wheel39;,wheel_shape(w=w,d=d))
def sliding_beam(w=39,d=606,h=41,t=3):
beam=s3d.shell(s3d.box(&class="tok-comment">#39;sliderclass="tok-string">39;,w=w,d=d,h=h),t=t,open=39;+Y -Y39;)
s3d.material(beam,kind=&class="tok-comment">#39;steelclass="tok-string">39;,color=39;#92999e39;)
return s3d.group(&class="tok-comment">#39;sliding_beam39;,beam)
def lifting_linkage(w=77,d=436,h=87,strip_w=34,t=10,pin_d=14,pivot_y=-208,pivot_z=24):
side=s3d.poly(pts=[(-218,18),(-202,14),(-127,70),(218,77),(218,84),(-119,84)],fillet=2)
main=s3d.at(s3d.extrude(&class="tok-comment">#39;arm39;,side,h=strip_w),x=-11.5-strip_w/2,rx=90,rz=90)
axle=s3d.at(s3d.cylinder(&class="tok-comment">#39;pivot_shaft39;,d=pin_d,h=w),x=-w/2,y=pivot_y,z=pivot_z,ry=90)
pin=s3d.at(s3d.cylinder(&class="tok-comment">#39;secondary_pin39;,d=pin_d,h=w-t*2),x=-w/2+t,y=-189,z=34,ry=90)
arm=s3d.group(&class="tok-comment">#39;arm_body39;,main,axle,pin)
s3d.material(arm,kind=&class="tok-comment">#39;steelclass="tok-string">39;,color=39;#6e767b39;)
lever=s3d.at(operating_lever(),x=-11.5,y=-123.5,z=63)
limit=s3d.at(travel_limiter(),x=-12,y=-174.5,z=8)
s3d.joint(&class="tok-comment">#39;joint_armPart_01_joint_00class="tok-string">39;,lever,s3d.local(arm,x=-11.5,y=-160,z=68),axis=39;+X39;,range=(0,175))
s3d.joint(&class="tok-comment">#39;joint_limiter_01_joint_00class="tok-string">39;,limit,s3d.local(arm,x=-7.5,y=-189,z=34),axis=39;+X39;,range=(-6,6))
return s3d.group(&class="tok-comment">#39;lifting_linkage39;,arm,lever,limit)
def operating_lever(w=32,d=83,h=52,t=4):
p=s3d.poly(pts=[(-d/2,0),(-d/2+12,0),(d/2,h-7),(d/2,h),(-d/2,12)],fillet=3)
one=s3d.at(s3d.extrude(&class="tok-comment">#39;lever_cheek39;,p,h=t),x=-w/2,rx=90,rz=90)
other=s3d.transform(s3d.copy(one),x=w-t)
ob=s3d.group(&class="tok-comment">#39;operating_lever39;,one,other)
s3d.material(ob,kind=&class="tok-comment">#39;steelclass="tok-string">39;,color=39;#a0a2a139;)
return ob
def travel_limiter(w=25,d=65,h=37,t=5):
ob=s3d.at(s3d.box(&class="tok-comment">#39;stop_link39;,w=w,d=d,h=t),z=h/2,rx=-20)
s3d.material(ob,kind=&class="tok-comment">#39;steelclass="tok-string">39;,color=39;#747c8039;)
return s3d.group(&class="tok-comment">#39;travel_limiter39;,ob)