Apologies in advance, I'm no mathematician so I'm probably going to use the wrong terms but hopefully it will be understandable
I've had a search to try and find an existing question but I could only find things like the below which are kind of related but not what I need
Fitting n number of squares into n area
I've been tasked with creating a visualisation on a website which does cut-to-size sheets and I'm trying to work out the logic for how to best fit them on to the full sheet to create the least wastage
** edit ** I want to leave the biggest rectangle possible ** edit**
So for example, one full sheet measures 2440 x 1220
If they have an order for the following sheets
422 x 342 (x3)
415 x 355 (x2)
415 x 374 (x3)
All of these smaller sheets can be cut from one full sheet, but is there some kind of formula or method I could use to work out the best placement of these sheets to create the greatest remaining area?
If anything doesn't make sense, please say and I'll do my best to elaborate
Also, if this has any terminology that could be added as a tag, please let me know
Thanks in advance