Posts By Category

Posts By Date

Resources:

C# Books
ASP.NET Books DotNet4All








If you like to support this site, feel free to make a donation to support improvements.

Thank you!

Monetize Your Blog

A C# Algorithm to calculate the best way to cut small pieces of paper out of a larger piece

This is a project I worked on last year. It is an algorithm to to show the best way to cut small pieces of paper out of a larger piece. I wrote the algorithm in C# then used System.Drawing.Imaging to to demo its outputĀ on an ASP.NET page.

The project is also available as an iPad/iPhone app, named Smart Cutter.

Here were the project's requirements:

Input: BigSheetWidth, BigSheetHeight, SmallSheetWidth, SmallSheetHeight
Output: A graphical representation of the most efficient paper setup.


More Information:
This algorithm is for a printing estimator program, and its objective is to show the best way to cut small pieces of paper out of a larger piece. BigSheetWidth x BigSheetHeight are the dimensions of the bigger sheet of paper. For example 24x36 inches (all sizes in this application are in inches)

SmallSheetWidth x SmallSheetHeight are the dimensions of the smaller piece of paper which we intend to cut out of the bigger piece above. For example 8.5x11 (Normal A4 paper)

So the output on input such as above should be a graphical representation and also a number representing the total small sheets you can get out of the big sheet (the most efficient method)

Like below:
Output: There can be at most 8 sheets of 8.5x11 cut out of a 24x36 paper.

Another example:

BigSheet: 28x40
SmallShet: 8.5x11

WRONG Output!
There can be at most 8 sheets of 8.5x11 cut out of a 28x40 paper.


Correct Output:
There can be at most 10 sheets of 8.5x11 cut out of a 28x40 paper.

If you are interested in purchasing the algorithm, just send me a note here, and I'll be glad to send it over.

Algorithm #105 Demo

kick it on DotNetKicks.com

Feedback

Posted on 10/18/2011 7:17:52 AM

Hi Every one,

Smart Cutter app for iPad/iPhone which uses Algorithm 105 is now in the App Store:

http://itunes.apple.com/us/app/smart-cutter/id472795191?ls=1&mt=8

For more info:
http://smartcutterapp.com/

Demo Video:
http://www.youtube.com/watch?v=A8_mrmqaBXk

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 


Copyright © 2007 Yousef Mannaa. All material on this site is copyrighted.
Do not publish or reproduce any of this material without written permission from the Author