The goal of this assignment was to perform software-driven fabrication. We wrote a program that will generate a cardboard layout for folding an open-bin box. In the program, the user enters the dimensions of the material and the desired bin box. The software then generates an SVG file, which is then imported into a laser-cutter software and used to cut cardboard sheets to be folded into a box.
The maximum possible dimensions of any box and material were the defined as the work area of the laser cutter in the Makerspace (Thunder Laser Nova51). Length = 51.2, Width = 35.4, and Height = 9.1.
When the python script is run, the user is asked to input the length, width and thickness of the material they are expecting to cut. This user input is first checked to make sure there are no negative values or zeros. Then, the material dimensions were compared to the laser cutter work area to make sure they are within the maximum cutting area.
Next, the user is asked to enter the desired box length, width and height. These values are also checked to make sure there are no negative values or zeros and to make sure make sure that the box dimensions are less than the material dimensions.
The fold height was calculated to be the lesser of the (box width or box height) divided by 6. The flap height was calculated to be the same as the fold height. The flap width was calculated to be the lesser of the (box length or box height) divided by 2.
Our design has the entire box (with flaps and lid) to be cut from the same material. Therefore, the total length of the box that needs to fit on the material length was calculated as follows: total_length = box_length + (max(box_height,(fold_height+(flap_height*2)))*2)
Similarly, the total width of the box that needs to fit on the material length was as follows: total_width = (box_width*2) + (box_height*2) + fold_height + (flap_height*2)
If the total box length was greater than the material length, or the total box width was greater than the material width, then the software would print an error and prompt the user to enter new values.
The minimum dimensions of this box were defined to be 2"x2"x2". If a user enters any values less than 2" then the software would print an error and prompt the user to enter new values.
The software automatically calculated the position and dimensions of the box handles. These handles were placed on the sides of the box and were dependent on the box height and box width. The edges of the box were rounded and the handle was placed below the fold height, for when the lid folds onto the sides of the box.
The fold lines were automatically calculated based on the box outline. The thickness of the fold line was equal to the material thickness, so that the box can be folded without the two sides of the material overlapping and damaging each other.
The software outputs an SVG file with all the formatting that is required to make an SVG file (header, footers and descriptions) and the code for the box outline, fold lines, designs, text, and handles.
The laser cutter is only able to set different speeds and laser strengths per color. Therefore, we selected three colors for our box design.
- Green: The box outline and handles were a "cut" with slowest speed and most intense laser strength. The laser is supposed to cut through the material to separate the box at the green lines.
- Red: The fold lines were a "cut" with a faster speed and less intense laser strength. The laser is supposed to cut through half of the material to allow the material to fold.
- Blue: The designs and text were a "cut" with the fastest speed and least intense laser strength. The laser is supposed to engrave the designs and text onto the material.