# 2d cutting stock problem in google sheets

I run a cutting centre where I cut pieces(dimension Xi x Yi) of wood from one big stock each time different sizes (mostly 2800 x 2070). I want to know how to cut the big stock in order to minimize waste. All data should be gathered from a google spreadsheet and the solution should be written in GAS(google apps script).

1 - pieces size (Xi x Yi, and how many)

2 - saw thickness

3 - master blank sizes

----------------

Output:

Printable drawing (it can be pdf or google drawing or whatever) in A4 format, showing how I should cut the master wood blank into smaller pieces to minimize waste.

Small table with % waste.

I.e.

User input

1.

1500 | 1000 | 3

1500 | 500 | 2

820 | 220 | 4

400 | 400 | 5

600 | 400 | 9

100 | 300 | 4

2.

0,5 (saw thickness)

3.

2800 | 2070

example output:

What is also required is to add: based on which length I should print out "graphics".
Based on length Xi or Yi

1.
Xi | Yi | How many | graphics according to dim X or Y, where 1 represent X and 2 represent Y
--------------------------------------------------
1500 | 1000 | 3 | 1
1500 | 500 | 2 | 2
820 | 220 | 4 | 1
400 | 400 | 5 | 2
600 | 400 | 9 | 1
100 | 300 | 4 | 1

2. Saw thickness:
0,5

3. Master blank size
2800 x 2700

Sample output attached

Compétences : Javascript

Concernant l'employeur :
( 0 commentaires ) Toszek, Poland

Nº du projet : #12706738

## Décerné à:

mdkass

Hello, I'm a G-suite developer, the optimization part of this project is tricky but is doable using apps script, but there is no draw support and no one can draw even a line inside an image without the use of an exter Plus

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% EUR en 10 jours
(12 Commentaires)
4.4

## 7 freelance font une offre moyenne de €211 pour ce travail

shaochao555

Hi employer. I am a web developer. I have many experience and affection with field of web specialty. We can discuss for good results. I will effort for complete your job satisfactorily.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(11 Commentaires)
3.9
mehulprajapati91

Dear Hiring Manager, I am professional software,website & mobile app. developer.I can start working as soon as possible. https://www.freelancer.com/u/mehulprajapati91.html -- My previously Worked proje Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 10 jours
(8 Commentaires)
3.5
kabukii919

Honorable Seniors,I will work for you all my best. i have experience of 6 years in developing wordpress,Magento,PHP,Javascrip,json,android,iPhon,Java so on programming and Delphi. Please hire me. I hope you are succe Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(1 Évaluation)
3.3

I have more than 5 years experience in PHP programming and well versed in open-sources / Framework like Codeigniter , OpenCart, Wordpress and other Web solutions . My strengths are web development, PHP, ajax, CSS, HTML Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(8 Commentaires)
2.8
yamaf555

Oh,friendly dear!!! I have the expensive experience of 5 years in developing Javascript and can carry out your any proposal in time completely. I understand your proposal enough,so I have mind to perform the task a Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(2 Commentaires)
2.0
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(3 Commentaires)
1.6
hawkscodeaus

Hi, I can start work on your project immediately once you confirm me and i am also open for further discussion if you want. I have 7+ years in web designing & development with good experience in following skills Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(1 Évaluation)
0.6
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(0 Commentaires)
0.0
nwnz

Dear Hiring Manager, I read through the job details extremely carefully and I am absolutely sure that I can do the project very well. My work experience as shown in my profile have helped me develop mastery in We Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% EUR en 3 jours
(0 Commentaires)
0.0