import sand3d as s3d
def crosslight():
cover = s3d.at(hub_cover(), x=1, y=1.5, z=51)
rotor = s3d.at(rotor_base(), y=1.5, z=-1)
s3d.joint(&class="tok-comment">#39;joint_rotor_01_joint_00class="tok-string">39;, rotor, on=s3d.local(cover, x=-1, y=-1.5, z=-51), kind=39;continuousclass="tok-string">39;, axis=39;+Z39;)
return s3d.assembly(&class="tok-comment">#39;crosslight39;, cover, rotor)
def hub_cover(d=358, h=113, wall=5, skirt_bottom=44, skirt=40, core_d=270, bore=160, core_h=90, webs=16):
solid = s3d.revolve(&class="tok-comment">#39;cover39;, s3d.poly([(d/2-wall,skirt_bottom),(d/2,h-skirt),(d/2,h-wall),(0,h),(0,h-wall*2),(d/2-wall,h-wall*2),(d/2-wall,h-skirt),(d/2-wall*2,skirt_bottom)]))
core = s3d.revolve(&class="tok-comment">#39;inner_housing39;,s3d.poly([(bore/2,0),(core_d/2,0),(core_d/2,core_h),(core_d/2-wall,core_h),(core_d/2-wall,wall),(bore/2+wall,wall),(bore/2+wall,core_h-wall*3),(bore/2,core_h-wall*3)]))
fins = s3d.at(s3d.box(&class="tok-comment">#39;web39;,w=(core_d-bore)/2,d=wall,h=core_h-wall*3),on=s3d.ring(n=webs,r=(core_d+bore)/4),z=wall/2)
s3d.join(core,fins)
s3d.material(solid, &class="tok-comment">#39;painted_metalclass="tok-string">39;, color=39;#dadde039;)
s3d.material(core, &class="tok-comment">#39;aluminiumclass="tok-string">39;, color=39;#b8bbc039;)
return s3d.group(&class="tok-comment">#39;hub_cover39;, solid,core)
def rotor_base(d=350, bottom_d=278, h=89, wall=5, band=12, floor=33):
solid = s3d.revolve(&class="tok-comment">#39;rotor39;, s3d.poly([(0,0),(bottom_d/2,0),(d/2,h-band),(d/2,h),(d/2-wall,h),(d/2-wall,h-band),(bottom_d/2,floor),(0,floor)]))
s3d.material(solid, &class="tok-comment">#39;painted_metalclass="tok-string">39;, color=39;#b9bdc239;)
three = s3d.at(lamp_three(), x=-374, y=-1.5, z=45)
two = s3d.at(lamp_two(), x=-0.5, y=-375.5, z=45)
one = s3d.at(lamp_one(), x=373.5, y=-1.5, z=45)
four = s3d.at(lamp_four(), x=-0.5, y=373.5, z=45)
s3d.joint(&class="tok-comment">#39;joint_lamp_03_joint_00class="tok-string">39;, three, on=s3d.local(solid,x=-161,y=-1.5,z=68), axis=39;+Y39;, range=(-35,0))
s3d.joint(&class="tok-comment">#39;joint_lamp_02_joint_00class="tok-string">39;, two, on=s3d.local(solid,x=0,y=-162.5,z=68), axis=39;+X39;, range=(0,35))
s3d.joint(&class="tok-comment">#39;joint_lamp_01_joint_00class="tok-string">39;, one, on=s3d.local(solid,x=161,y=-1.5,z=68), axis=39;+Y39;, range=(0,35))
s3d.joint(&class="tok-comment">#39;joint_lamp_04_joint_00class="tok-string">39;, four, on=s3d.local(solid,x=0,y=159.5,z=68), axis=39;+X39;, range=(-35,0))
return s3d.group(&class="tok-comment">#39;rotor_base39;,solid,three,two,one,four)
def lamp_three(w=452,d=174,h=39,r=21,bevel=7):
solid = s3d.extrude(&class="tok-comment">#39;arm39;,s3d.rect(w=w,d=d,r=r),h=h)
s3d.chamfer(solid,d=bevel,edges=&class="tok-comment">#39;top bottom39;)
s3d.material(solid,&class="tok-comment">#39;plasticclass="tok-string">39;,color=39;#eeeeea39;)
return s3d.group(&class="tok-comment">#39;lamp_three39;,solid)
def lamp_two(w=173,d=450,h=39,r=21,bevel=7):
solid = s3d.extrude(&class="tok-comment">#39;arm39;,s3d.rect(w=w,d=d,r=r),h=h)
s3d.chamfer(solid,d=bevel,edges=&class="tok-comment">#39;top bottom39;)
s3d.material(solid,&class="tok-comment">#39;plasticclass="tok-string">39;,color=39;#eeeeea39;)
return s3d.group(&class="tok-comment">#39;lamp_two39;,solid)
def lamp_one(w=451,d=174,h=39,r=21,bevel=7):
solid = s3d.extrude(&class="tok-comment">#39;arm39;,s3d.rect(w=w,d=d,r=r),h=h)
s3d.chamfer(solid,d=bevel,edges=&class="tok-comment">#39;top bottom39;)
s3d.material(solid,&class="tok-comment">#39;plasticclass="tok-string">39;,color=39;#eeeeea39;)
return s3d.group(&class="tok-comment">#39;lamp_one39;,solid)
def lamp_four(w=173,d=452,h=39,r=21,bevel=7):
solid = s3d.extrude(&class="tok-comment">#39;arm39;,s3d.rect(w=w,d=d,r=r),h=h)
s3d.chamfer(solid,d=bevel,edges=&class="tok-comment">#39;top bottom39;)
s3d.material(solid,&class="tok-comment">#39;plasticclass="tok-string">39;,color=39;#eeeeea39;)
return s3d.group(&class="tok-comment">#39;lamp_four39;,solid)