The Backbone of the Project

8020 aluminum extrusion is the framing material of choice for my laser cutter project. It’s a lightweight, but extremely versatile shape of extruded metal. 8020 is the common brand name, but it also is called t-slotted framing on McMaster-Carr. It is a rectangular shape with t-slot features on 4 of the faces long faces. The inside of the extrusion is directly accessible from the ends and is usually hollow to optimize for minimal material use.

Two pieces of 8020 extrusion and a corner bracket.

Lengths of 8020 extrusions are connected via brackets. The brackets are bolted to the extrusion with bolts and t-nuts that interface in the t-slots of the extrusion. This allows the brackets to be adjusted freely up and down the extrusion.

Multiple brackets on a piece of extrusion.

The versatility of aluminum extrusion is furthered by different size and shape versions. Aluminum extrusion at its smallest is 20 mm by 20 mm, it is square and has 1 t-slot on each face. It also has imperial variants at 1 by 1 inch and even 1.5 inch by 1.5 inch. The next step up is rectangular extrusions, 20mm by 40 mm, or a similar imperial variant. It has two t-slots on the 40mm length sections. There are also 40mm by 40mm, 20mm by 60mm, and a wide combination of bigger versions. I stuck with the base two sizes, 20 x 20 and 20 x 40 for this project, but something like a router would need much bigger extrusions to handle the forces.

In the rest of this project, I will refer to 20mm by 20mm aluminum extrusion as 2020 and 20mm by 40mm by 2040. It’s just a little bit more clear and concise.

How Much Material is Needed?

The laser uses a wide range of lengths of extrusion. Some vendors will do cut-to-length sections where the customer submits a list of lengths needed, and the exact lengths are shipped. However there is usually a fairly large fee for cut to length, so I opted to purchase 6ft sections of extrusion and cut them down myself.

This still doesn’t answer the question though, how many 6ft sections do we need? We could add up all the lengths and divide by 6ft, but this introduces some problems. What if in that division the lengths aren’t all divisible by 6ft. Some lengths might be split into two 6ft sections. For example, if we need 6 4ft sections, we need a total of 24ft of extrusion. You might assume since 24ft / 6ft sections this means we need 4 sections, but in reality, we need 6. You can’t get 1.33 4ft sections out of a 6ft length; you can only get 1. The actual solution involves an algorithm called bin-packing.

Bin-Packing Algorithm

The bin packing algorithm is a classic optimization problem in computer science and mathematics that deals with efficiently packing a set of items of varying sizes into a minimal number of containers or bins, each with a fixed capacity. The objective is to minimize the number of bins used while ensuring that no bin exceeds its maximum capacity.

Here’s a general description of the bin-packing algorithm:

  1. Input:
    • A list of items, each with a weight or size.
    • A fixed bin capacity (the maximum weight or size that each bin can hold).
  2. Initialization:
    • Start with an empty set of bins.
    • Sort the items in decreasing order of size (or weight).
  3. Packing:
    • For each item in the sorted list:
      • Iterate through the existing bins to find the first bin that can accommodate the item without exceeding its capacity.
      • If a suitable bin is found, place the item in that bin.
      • If no bin can accommodate the item, create a new bin and place the item in it.
  4. Completion:
    • Continue this process for all items in the list until all items have been packed.
  5. Output:
    • The final configuration of bins with packed items.

The bin packing problem has practical applications in various fields, including logistics, resource allocation, and resource management, where minimizing waste or maximizing resource utilization is essential. Researchers and practitioners continue to develop and study different algorithms and approaches to tackle various bin-packing scenarios efficiently.

Modifying the Bin Packer for Our Needs

The bin packing algorithm is such a common use, that it can be imported as a pre-made library of code into a python file. We can create a Python project that uses the bin-packing algorithm library and imports data from a file to save time.

Importing from CVS saves time when entering a lot of extrusion lengths. Python can read the file and pull in all the data, as well as apply a quantity multiplier, and separate 2020 from 2040 extrusion.

Then the program asks the user for the stock length it will try to pack extrusions into. The cutting process that takes a single stock and cuts it into multiple pieces introduces another factor into the equation, kerf. A saw removes material as it cuts; the width of the blade. So the program needs to account for this material with each cut.

With all of the information provided, the program then computes the best possible use of material. It displays each cut length for each piece of stock on the terminal, and it saves it to a file for future reference when we cut the stock. The count of these stocks is given, and we can order the correct amount of aluminum extrusion needed.

I ordered extrusion from the website tnutz.com. They were by far the most affordable option I could find. McMaster Carr and 8020.com both provide shipped cut-to-length aluminum extrusion, but the cost is almost double. While ordering the required number of extrusions, I got an extra length of 2020 and 2040 just in case and purchased t-slot mountable hinges for the doors of the laser.

Other Project Updates

See the rest of the project posts below:

    What more do we offer?

    Discover other great products and stories:

      Leave a comment

      Your email address will not be published. Required fields are marked *