import sand3d as s3d
def workstation():
root = s3d.at(body_01(), x=-16, z=-1)
a = s3d.at(shelf_01(), x=11.5, y=-1359.5, z=114)
b = s3d.at(shelf_06(), x=27, y=-304.5, z=114)
c = s3d.at(shelf_07(), x=69, y=1134.5, z=499)
d = s3d.at(shelf_08(), x=68, y=1134.5, z=119)
e = s3d.at(shelf_04(), x=-34, y=-974, z=206)
f = s3d.at(shelf_02(), x=-34, y=-974, z=611)
g = s3d.at(shelf_03(), x=-34, y=-974, z=409)
h = s3d.at(shelf_05(), x=299.5, y=-983, z=114)
s3d.joint(&class="tok-comment">#39;joint_shelf_01_joint_00class="tok-string">39;, a, s3d.local(root, x=286, y=-1359, z=640), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,460.7))
s3d.joint(&class="tok-comment">#39;joint_shelf_06_joint_00class="tok-string">39;, b, s3d.local(root, x=349, y=-305, z=451), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_07_joint_00class="tok-string">39;, c, s3d.local(root, x=350, y=1130, z=836), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_08_joint_00class="tok-string">39;, d, s3d.local(root, x=349, y=1130, z=456), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_04_joint_00class="tok-string">39;, e, s3d.local(root, x=275, y=-978, z=298), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_02_joint_00class="tok-string">39;, f, s3d.local(root, x=275, y=-978, z=704), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_03_joint_00class="tok-string">39;, g, s3d.local(root, x=275, y=-978, z=501), kind=39;prismaticclass="tok-string">39;, axis=39;+X39;, range=(0,400))
s3d.joint(&class="tok-comment">#39;joint_shelf_05_joint_00class="tok-string">39;, h, s3d.local(root, x=313, y=-1204, z=500), kind=39;revoluteclass="tok-string">39;, axis=39;+Z39;, range=(-90,0))
return s3d.assembly(&class="tok-comment">#39;workstation39;, root,a,b,c,d,e,f,g,h)
def body_01(w=648,d=3023,h=928,t=25,top=38,base=114,wide=1651,narrow=753,well_w=437,well_d=692,well_y=-305,well_bottom=509):
counter = s3d.at(s3d.box(&class="tok-comment">#39;counter39;,w,d,top), z=h-top)
tool = s3d.at(s3d.box(&class="tok-comment">#39;opening39;,well_w,well_d,top*2),x=5.5,y=well_y,z=h-top-1)
s3d.cut(counter, tool)
solids=[counter]
for length,cy in [(wide,-d/2+wide/2),(narrow,d/2-narrow/2)]:
cab = s3d.at(s3d.box(&class="tok-comment">#39;carcass39;,w-12,length,h-top-base),x=-6,y=cy,z=base)
void = s3d.at(s3d.box(&class="tok-comment">#39;interior39;,w,length-2*t,h),x=t,y=cy,z=base+t)
s3d.cut(cab,void)
plinth=s3d.at(s3d.box(&class="tok-comment">#39;plinth39;,t,length,base+1),x=w/2-90,y=cy)
back=s3d.at(s3d.box(&class="tok-comment">#39;back_foot39;,t,length,base+1),x=-w/2+t/2,y=cy)
solids.extend([cab,plinth,back])
partition=s3d.at(s3d.box(&class="tok-comment">#39;partition39;,w-12,t,h-top-base),x=-6,y=-749-t/2,z=base)
well=s3d.at(s3d.box(&class="tok-comment">#39;well39;,584,840,h-top-well_bottom),x=-6,y=well_y,z=well_bottom)
cavity=s3d.at(s3d.box(&class="tok-comment">#39;well_void39;,584-2*12,840-2*12,h),x=-6,y=well_y,z=well_bottom+12)
s3d.cut(well,cavity)
front=s3d.at(s3d.box(&class="tok-comment">#39;apron39;,20,889,390),x=w/2-22,y=well_y,z=500)
solids.extend([partition,well,front])
for ob in solids:
s3d.material(ob,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;body_0139;,*solids)
def shelf_01(w=655,d=303,h=773,front=25,inset=18,low_z=34,high_z=460,low_h=180,high_h=130):
face=s3d.at(s3d.box(&class="tok-comment">#39;front39;,front,d,h),x=w/2-front/2-42)
low=s3d.at(drawer_tray(w=w-60,d=d-2*inset,h=low_h,t=12),x=-30,z=low_z)
high=s3d.at(drawer_tray(w=w-60,d=d-2*inset,h=high_h,t=12),x=-30,z=high_z)
s3d.material(face,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;shelf_0139;,face,low,high)
def drawer_tray(w=586,d=396,h=195,t=12):
bottom=s3d.box(&class="tok-comment">#39;drawer_bottom39;,w,d,t)
rear=s3d.at(s3d.box(&class="tok-comment">#39;drawer_back39;,t,d,h),x=-w/2+t/2)
face=s3d.at(s3d.box(&class="tok-comment">#39;drawer_front39;,t,d,h),x=w/2-t/2)
side=s3d.at(s3d.box(&class="tok-comment">#39;drawer_side39;,w,t,h/2),y=-d/2+t/2)
twin=s3d.transform(s3d.copy(side),mirror=&class="tok-comment">#39;y39;)
rail=s3d.at(s3d.box(&class="tok-comment">#39;rail39;,w,t,t),y=-d/2+t/2,z=h-t)
rail2=s3d.transform(s3d.copy(rail),mirror=&class="tok-comment">#39;y39;)
s3d.join(bottom,rear,face,side,twin,rail,rail2)
s3d.material(bottom,&class="tok-comment">#39;aluminiumclass="tok-string">39;,color=39;#a7a9a839;)
return bottom
def shelf_06(w=626,d=889,h=377,t=20,depth=552,tray_h=320,bottom_z=35,side_h=110):
face=s3d.at(s3d.box(&class="tok-comment">#39;front39;,t,d,h),x=w/2-t/2-43)
tray=s3d.at(wide_tray(w=depth,d=d-56,h=tray_h,t=12,side_h=side_h),x=-w/2+depth/2,z=bottom_z)
s3d.material(face,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;shelf_0639;,face,tray)
def wide_tray(w=552,d=833,h=320,t=12,side_h=110):
bottom=s3d.box(&class="tok-comment">#39;drawer_bottom39;,w,d,t)
rear=s3d.at(s3d.box(&class="tok-comment">#39;drawer_back39;,t,d,h),x=-w/2+t/2)
face=s3d.at(s3d.box(&class="tok-comment">#39;drawer_front39;,t,d,h),x=w/2-t/2)
side=s3d.at(s3d.box(&class="tok-comment">#39;drawer_side39;,w,t,side_h),y=-d/2+t/2)
twin=s3d.transform(s3d.copy(side),mirror=&class="tok-comment">#39;y39;)
rail=s3d.at(s3d.box(&class="tok-comment">#39;rail39;,w,t,t),y=-d/2+t/2,z=h-t)
rail2=s3d.transform(s3d.copy(rail),mirror=&class="tok-comment">#39;y39;)
s3d.join(bottom,rear,face,side,twin,rail,rail2)
s3d.material(bottom,&class="tok-comment">#39;aluminiumclass="tok-string">39;,color=39;#a7a9a839;)
return bottom
def shelf_07(w=544,d=753,h=380,t=20,depth=480,tray_h=294):
face=s3d.at(s3d.box(&class="tok-comment">#39;front39;,t,d,h),x=w/2-t/2-44)
tray=s3d.at(drawer_tray(w=depth,d=d-56,h=tray_h,t=12),x=-w/2+depth/2,z=8)
s3d.material(face,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;shelf_0739;,face,tray)
def shelf_08(w=544,d=753,h=379,t=20,depth=480,tray_h=294):
face=s3d.at(s3d.box(&class="tok-comment">#39;front39;,t,d,h),x=w/2-t/2-43)
tray=s3d.at(drawer_tray(w=depth,d=d-56,h=tray_h,t=12),x=-w/2+depth/2,z=8)
s3d.material(face,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;shelf_0839;,face,tray)
def shelf_04(w=586,d=396,h=195):
return s3d.group(&class="tok-comment">#39;shelf_0439;,drawer_tray(w=w,d=d,h=h,t=12))
def shelf_02(w=586,d=394,h=186):
return s3d.group(&class="tok-comment">#39;shelf_0239;,drawer_tray(w=w,d=d,h=h,t=12))
def shelf_03(w=586,d=396,h=195):
return s3d.group(&class="tok-comment">#39;shelf_0339;,drawer_tray(w=w,d=d,h=h,t=12))
def shelf_05(w=81,d=456,h=774,t=20):
face=s3d.at(s3d.box(&class="tok-comment">#39;door39;,t,d,h),x=w/2-43-t/2)
s3d.material(face,&class="tok-comment">#39;painted_metalclass="tok-string">39;,color=39;#b5b6b339;)
return s3d.group(&class="tok-comment">#39;shelf_0539;,face)