import sand3d as s3d
def squeegee():
grip = s3d.at(grip_body(), x=-186, y=-97, z=1)
arm = s3d.at(pivot_arm(), x=-186, y=-6.5, z=4)
s3d.joint(&class="tok-comment">#39;joint_armBase_01_joint_00class="tok-string">39;, arm, s3d.local(grip, x=0, y=65, z=24), kind=39;revoluteclass="tok-string">39;, axis=39;+X39;, range=(-65, 15))
return s3d.assembly(&class="tok-comment">#39;squeegee39;, grip, arm)
def grip_body(w=49, d=172, h=48, mouth=38, wall=2, pivot_d=44):
grip = s3d.loft(&class="tok-comment">#39;grip39;, s3d.station(z=18, w=38, d=32), s3d.station(z=31, w=36, d=30), s3d.station(z=65, w=39, d=35), s3d.station(z=99, w=42, d=37), s3d.station(z=133, w=40, d=35), s3d.station(z=151, w=mouth, d=36))
grip = s3d.shell(grip, t=wall, open=&class="tok-comment">#39;end39;)
grip = s3d.at(grip, y=65, z=h/2, rx=90)
cheek = s3d.at(s3d.cylinder(&class="tok-comment">#39;pivot_cheek39;, d=pivot_d, h=(w-24)/2), x=12, y=65, z=h/2, ry=90)
cap = s3d.at(s3d.cylinder(&class="tok-comment">#39;pivot_recess39;, d=pivot_d-7, h=wall), x=w/2-wall/2, y=65, z=h/2, ry=90)
other = s3d.transform(s3d.copy(cheek), mirror=&class="tok-comment">#39;x39;)
cap_other = s3d.transform(s3d.copy(cap), mirror=&class="tok-comment">#39;x39;)
s3d.material(grip, &class="tok-comment">#39;rubberclass="tok-string">39;, color=39;#454b5039;)
for ob in [cheek, other, cap, cap_other]:
s3d.material(ob, &class="tok-comment">#39;plasticclass="tok-string">39;, color=39;#444b5139;)
return s3d.group(&class="tok-comment">#39;grip_body39;, grip, cheek, other, cap, cap_other)
def pivot_arm(w=41, d=91, h=42, pin_d=41, pin_w=24, plate_t=4.5, slope=7):
pin = s3d.at(s3d.cylinder(&class="tok-comment">#39;hinge39;, d=pin_d, h=pin_w), x=-pin_w/2, y=-25.5, z=21, ry=90)
outline = s3d.poly([(-w/2,-25.5), (w/2,-25.5), (w/2,25), s3d.arc(center=(0,25), r=w/2, start=0, end=180)])
plate = s3d.at(s3d.extrude(&class="tok-comment">#39;upper_arm39;, outline, h=plate_t), z=35, rx=-slope)
lower = s3d.at(s3d.extrude(&class="tok-comment">#39;lower_arm39;, outline, h=plate_t), z=16, rx=slope/2)
axle = s3d.at(s3d.cylinder(&class="tok-comment">#39;head_axle39;, d=5, h=17), y=31.5, z=18)
boss = s3d.at(s3d.extrude(&class="tok-comment">#39;boss39;, s3d.slot(l=20, d=14), h=2), y=-2, z=40, rz=90, rx=-slope)
s3d.material([pin, plate, lower, axle, boss], &class="tok-comment">#39;plasticclass="tok-string">39;, color=39;#555d6239;)
head = s3d.at(wiping_head(), y=43.5, z=10)
parent = s3d.group(&class="tok-comment">#39;pivot_arm39;, pin, plate, lower, axle, boss, head)
s3d.joint(&class="tok-comment">#39;joint_armJoint_01_joint_00class="tok-string">39;, head, s3d.local(parent, x=0, y=31.5, z=31), kind=39;revoluteclass="tok-string">39;, axis=39;+Z39;, range=(-40,40))
return parent
def wiping_head(w=411, d=86, h=35, head_w=120, head_depth=52, t=6, lip_y=43, lip_z=3, rail_y=9, rail_z=14, ridge_y=15, ridge_z=11, back_y=32, back_z=12):
profile = s3d.poly([(rail_y,lip_z),(lip_y,lip_z),(lip_y,lip_z+4),(back_y,lip_z+5),(back_y,back_z),(19,ridge_z),(ridge_y,rail_z),(rail_y+4,rail_z),(rail_y,ridge_z)])
bar = s3d.at(s3d.extrude(&class="tok-comment">#39;rail39;, profile, h=w), x=-w/2, rx=90, rz=90)
outline = s3d.poly([(-head_w/2,rail_y), s3d.spline([(-head_w/2,rail_y),(-52,-16),(0,rail_y-head_depth),(52,-16),(head_w/2,rail_y)]), (head_w/2,18),(-head_w/2,18)])
head = s3d.at(s3d.extrude(&class="tok-comment">#39;head39;, outline, h=t), z=10)
shoulder = s3d.at(s3d.box(&class="tok-comment">#39;shoulder39;, w=25, d=10, h=17), x=40, y=10, z=16)
twin = s3d.transform(s3d.copy(shoulder), mirror=&class="tok-comment">#39;x39;)
s3d.material([bar,head,shoulder,twin], &class="tok-comment">#39;aluminiumclass="tok-string">39;, color=39;#959da239;)
latch = s3d.at(curved_latch(), y=-14, z=21)
parent = s3d.group(&class="tok-comment">#39;wiping_head39;, bar,head,shoulder,twin,latch)
s3d.joint(&class="tok-comment">#39;joint_armHandle_01_joint_00class="tok-string">39;, latch, s3d.local(parent, x=0, y=4, z=33), kind=39;revoluteclass="tok-string">39;, axis=39;+X39;, range=(-135,0))
return parent
def curved_latch(w=103, d=42, h=15, t=3, shoulder_w=23, shoulder_d=14):
outline = s3d.poly([(-w/2,d/2),s3d.spline([(-w/2,d/2),(-38,-9),(0,-d/2),(38,-9),(w/2,d/2)]),(29,d/2),s3d.spline([(29,d/2),(23,0),(0,-14),(-23,0),(-29,d/2)])])
band = s3d.at(s3d.extrude(&class="tok-comment">#39;curved_latch39;, outline, h=t), z=h-t-1)
end = s3d.at(s3d.box(&class="tok-comment">#39;hinge_shoulder39;, w=shoulder_w, d=shoulder_d, h=h-1), x=(w-shoulder_w)/2, y=(d-shoulder_d)/2)
twin = s3d.transform(s3d.copy(end), mirror=&class="tok-comment">#39;x39;)
s3d.material([band,end,twin], &class="tok-comment">#39;plasticclass="tok-string">39;, color=39;#50595f39;)
return s3d.group(&class="tok-comment">#39;curved_latch39;,band,end,twin)