I work for a company that builds structural steel buildings. My primary position is basically anything to do with IT, but we have been building a complete system that links all our departments together, from pre-quotation to post shipping.
One of the biggest challenges in this has been to create a connection that links our CAD files to our Database to create our Bills of Materials. We have pretty much all of it functioning now, but one thing still eludes me. We have a "tag" in AutoCAD for each of the items on the building, which exports to Excel to let us know how many of each length we need for said building, but we have to manually calculate how many total pieces we need to buy. I'll try to visualize below:
If the building has:
(4) @ 4' 3-15/16"
(2) @ 4' 2 1/8"
(5) @ 2' 6"
Then we need to buy (2) total 20' lengths. AutoCAD and Excel do all the math for calculating the individual lengths, but not the total lengths. I can't simply add up the lengths and divide by 20 as that will not be accurate.
Is there a way to automate this process?
(Also, I don't post here often, so forgive me if I stated something improperly or did something wrong.)
EDIT: I probably should add that our Database is written in MySQL with interfaces written in HTML5/CSS3 and using PHP and JS/JQ for any functionality.
I am more than happy to any details that may be needed, but as I don't know exactly what I am looking for, I don't know what is relevant and what's not.
EDIT 2: What it is that I am looking for is a way to calculate the total number of pieces needed to be able to cut all of the individual smaller pieces with the smallest scrap possible. We may get a particular item in 24 foot lengths, but will have 2 pieces that need to be 16 feet and 4 that need to be 7 feet. In total lineal feet, that means that I could technically use 3 pieces, but in reality, after getting those pieces and cutting them, we would need 4 because each piece loses 1/16 of an inch due to the saw blade. This would be a small example, as many of our jobs need 20+ 24' lengths that we will then cut into said smaller pieces.
I THINK what I need is a way to loop through each item, and basically add as many items to a new length until I can't fit any more, then add a new Item and repeat, and have it loop through from longest to shortest... something along those lines, but I need someone smarter than myself to point me in the right direction...