That’s your basic problem. Your problem is more difficult because you want to calculate cost based on surface area?For that you will need to be able to calculate the surface area for any possible surface? You will need to create an algorithm that divides a shape into triangles and then approximates the size.
No cost calculation, it’s a different thing. It’ll cost as much as big the area of the basic sheet is. That’s why it should fit in less possible sheets.
Some weeks ago i designed some furniture. I had to fit the pieces into the raw sheet, You can’t imagine how many problems i had with that. The company which was cutting the pieces had a program that calculates all the thing. But still the manager of the company, a friend of mine, made it by himself with my help, saying “I don’t trust the machines”
The problem is not only to fit the pieces in the sheet, You need to find out the direction of the texture too, and it adds one more variable, problem. You need to keep in mind that the saw is cutting about 4mm on every pass, so Your program must count this one too, cuz there were a lot of problems with this when i did not count that 4mm.
I tried using this, it is quite nice one and cheap and has free trial.