import sand3d as s3d
def extractor_hood():
root = s3d.at(hood(), x=178.8, y=-77, z=0)
return s3d.assembly(class="tok-string">"extractor_hood", root)
def hood(w=750, d=498, h=996.5, rim=22, slope_top=328, cw=216, cd=167, cy=165, sleeve=620, step=5, wall=5, plate=8, origin_x=178.8, button_y=-249.5):
base = s3d.box(class="tok-string">"base", w=w, d=d, h=plate)
rim_shell = s3d.box(class="tok-string">"rim", w=w, d=d, h=rim)
rim_shell = s3d.shell(rim_shell, t=wall, open=class="tok-string">"top bottom")
outer = s3d.loft(class="tok-string">"canopy", s3d.station(z=rim, w=w-wall*2, d=d-wall*2, n=100), s3d.station(z=slope_top, w=cw, d=cd, y=cy, n=100))
inner = s3d.loft(class="tok-string">"canopy_inside", s3d.station(z=rim-wall, w=w-wall*4, d=d-wall*4, n=100), s3d.station(z=slope_top+wall, w=cw-wall*2, d=cd-wall*2, y=cy, n=100))
outer = s3d.cut(outer, inner)
lower = s3d.at(s3d.box(class="tok-string">"chimney_sleeve", w=cw, d=cd, h=sleeve-slope_top+wall), y=cy, z=slope_top-wall)
lower = s3d.shell(lower, t=wall, open=class="tok-string">"top bottom")
upper = s3d.at(s3d.box(class="tok-string">"chimney", w=cw-step, d=cd-step, h=h-sleeve+wall), y=cy, z=sleeve-wall)
upper = s3d.shell(upper, t=wall, open=class="tok-string">"top bottom")
metal = s3d.group(class="tok-string">"metal", base, rim_shell, outer, lower, upper)
s3d.material(metal, class="tok-string">"brushed_steel", color=class="tok-string">"class="tok-comment">#929698")
b4 = s3d.at(button_04(), x=450.5-origin_x, y=button_y, z=plate)
s3d.joint(class="tok-string">"joint_button_04_joint_00", b4, s3d.local(metal, x=272, y=-254, z=13), kind=class="tok-string">"prismatic", axis=class="tok-string">"-Y", range=(-6.2, 0))
b3 = s3d.at(button_03(), x=434.5-origin_x, y=button_y, z=plate)
s3d.joint(class="tok-string">"joint_button_03_joint_00", b3, s3d.local(metal, x=256, y=-254, z=13), kind=class="tok-string">"prismatic", axis=class="tok-string">"-Y", range=(-6.2, 0))
b5 = s3d.at(button_05(), x=467.5-origin_x, y=button_y, z=plate)
s3d.joint(class="tok-string">"joint_button_05_joint_00", b5, s3d.local(metal, x=289, y=-254, z=13), kind=class="tok-string">"prismatic", axis=class="tok-string">"-Y", range=(-6.2, 0))
b1 = s3d.at(button_01(), x=403-origin_x, y=button_y, z=plate)
s3d.joint(class="tok-string">"joint_button_01_joint_00", b1, s3d.local(metal, x=224, y=-254, z=13), kind=class="tok-string">"prismatic", axis=class="tok-string">"-Y", range=(-6.2, 0))
b2 = s3d.at(button_02(), x=419-origin_x, y=button_y, z=plate)
s3d.joint(class="tok-string">"joint_button_02_joint_00", b2, s3d.local(metal, x=240, y=-254, z=13), kind=class="tok-string">"prismatic", axis=class="tok-string">"-Y", range=(-6.2, 0))
return s3d.group(class="tok-string">"hood", metal, b4, b3, b5, b1, b2)
def button_04(w=11, d=17, h=10):
ob = s3d.box(class="tok-string">"button_04", w=w, d=d, h=h)
s3d.material(ob, class="tok-string">"plastic", color=class="tok-string">"class="tok-comment">#252525")
return s3d.group(class="tok-string">"button_04", ob)
def button_03(w=11, d=17, h=10):
ob = s3d.box(class="tok-string">"button_03", w=w, d=d, h=h)
s3d.material(ob, class="tok-string">"plastic", color=class="tok-string">"class="tok-comment">#252525")
return s3d.group(class="tok-string">"button_03", ob)
def button_05(w=11, d=17, h=10):
ob = s3d.box(class="tok-string">"button_05", w=w, d=d, h=h)
s3d.material(ob, class="tok-string">"plastic", color=class="tok-string">"class="tok-comment">#252525")
return s3d.group(class="tok-string">"button_05", ob)
def button_01(w=10, d=17, h=10):
ob = s3d.box(class="tok-string">"button_01", w=w, d=d, h=h)
s3d.material(ob, class="tok-string">"plastic", color=class="tok-string">"class="tok-comment">#252525")
return s3d.group(class="tok-string">"button_01", ob)
def button_02(w=10, d=17, h=10):
ob = s3d.box(class="tok-string">"button_02", w=w, d=d, h=h)
s3d.material(ob, class="tok-string">"plastic", color=class="tok-string">"class="tok-comment">#252525")
return s3d.group(class="tok-string">"button_02", ob)