<?xml version="1.0" encoding="UTF-8"?>
<!--
  CabCodeXF sample: a 600mm base unit with a drawer box and assembly steps (0.3).
  The drawer box is a sub-assembly built first (DB1) and added to the cabinet in step 4.
  Validates against ../schema/cabcodexf-0.3.xsd. See "Assembly steps" in ../cabcodexf-spec.md.
-->
<CabCodeXF xmlns="https://cabcode.uk/cabcodexf" version="0.3">
  <Header units="mm" producer="CabCodeXF reference fixture 0.3"/>
  <Materials><Material id="M1" token="W1000" type="MFC" thickness="18"/></Materials>
  <Hardware>
    <Item id="H3" kind="dowel" ref="dowel" quantity="8" description="Dowel 8mm x 30mm"/>
    <Item id="H4" kind="screw" ref="screw" quantity="4" description="Chipboard screw 4 x 16"/>
  </Hardware>
  <Part id="P1" name="Gable" role="side" quantity="2" length="720" width="560" thickness="18" grain="length" material="M1"/>
  <Part id="P2" name="Bottom" role="bottom" length="564" width="560" thickness="18" grain="length" material="M1"/>
  <Part id="P3" name="Back" role="back" length="564" width="702" thickness="18" grain="length" material="M1"/>
  <Part id="P4" name="Drawer side" label="DB-SIDE" role="drawer-box-side" quantity="2" length="450" width="120" thickness="16" grain="length" material="M1"/>
  <Part id="P5" name="Drawer back" role="drawer-box-back" length="468" width="120" thickness="16" grain="length" material="M1"/>
  <Part id="P6" name="Drawer bottom" role="drawer-box-bottom" length="468" width="434" thickness="16" grain="none" material="M1"/>
  <Assembly id="A1">
    <Instance part="P1" id="GABLE-L"><Position x="-300" y="-280" z="720"/><Orientation localX="-Z" localY="+Y" localZ="+X"/></Instance>
    <Instance part="P1" id="GABLE-R"><Position x="300" y="-280" z="0"/><Orientation localX="+Z" localY="+Y" localZ="-X"/></Instance>
    <Instance part="P2" id="BOTTOM"><Position x="-282" y="-280" z="0"/><Orientation localX="+X" localY="+Y"/></Instance>
    <Instance part="P3" id="BACK"><Position x="-282" y="280" z="18"/><Orientation localX="+X" localY="+Z"/></Instance>
    <Instance part="P4" id="DB1-SIDE-L"><Position x="-234" y="-250" z="160"/><Orientation localX="+Y" localY="-Z"/></Instance>
    <Instance part="P4" id="DB1-SIDE-R"><Position x="234" y="-250" z="40"/><Orientation localX="+Y" localY="+Z"/></Instance>
    <Instance part="P5" id="DB1-BACK"><Position x="-234" y="200" z="40"/><Orientation localX="+X" localY="+Z"/></Instance>
    <Instance part="P6" id="DB1-BOTTOM"><Position x="-234" y="-250" z="40"/><Orientation localX="+X" localY="+Y"/></Instance>
    <Steps>
      <Tools>3mm drill, cross-head screwdriver</Tools>
      <Safety>Two people needed to lift the cabinet.</Safety>
      <SubAssembly id="DB1" name="Drawer box 1">
        <Step n="1" text="Join the drawer sides to the drawer back.">
          <Add instance="DB1-SIDE-L" face="A" faceTo="inside"/>
          <Add instance="DB1-SIDE-R" face="A" faceTo="inside"/>
          <Add instance="DB1-BACK"/>
          <Fit hardware="H4" quantity="4"/>
        </Step>
        <Step n="2" text="Slide the drawer bottom into the grooves.">
          <Add instance="DB1-BOTTOM"/>
        </Step>
      </SubAssembly>
      <Step n="1" text="Start with the left side panel.">
        <Add instance="GABLE-L" face="A" faceTo="outside" edge="L1" edgeTo="front"/>
      </Step>
      <Step n="2" text="Fit the bottom.">
        <Add instance="BOTTOM"/>
        <Fit hardware="H3" quantity="4"/>
      </Step>
      <Step n="3">
        <Add instance="GABLE-R" face="A" faceTo="outside" edge="L1" edgeTo="front"/>
        <Add instance="BACK"/>
        <Fit hardware="H3" quantity="4"/>
      </Step>
      <Step n="4" text="Slide in the drawer box.">
        <AddSubAssembly ref="DB1"/>
      </Step>
    </Steps>
  </Assembly>
</CabCodeXF>
