PC Review


Reply
Thread Tools Rate Thread

Calculate quantity of shapes inside another shape

 
 
jlclyde
Guest
Posts: n/a
 
      6th Jul 2011
Hello,
I have been working on a formula that will calculate how many
rectangles will fit inside another rectangle. I am stuck. For
instance I have a rectange that is 29.125" X 36.125" and I need to
determine how many 4.875" X 7" rectangles I can fit inside to optomize
the original rectangle. Any help woudl be greatly appreciated.

Thanks,
Jay
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      6th Jul 2011
jlclyde presented the following explanation :
> Hello,
> I have been working on a formula that will calculate how many
> rectangles will fit inside another rectangle. I am stuck. For
> instance I have a rectange that is 29.125" X 36.125" and I need to
> determine how many 4.875" X 7" rectangles I can fit inside to optomize
> the original rectangle. Any help woudl be greatly appreciated.
>
> Thanks,
> Jay


It will depend on how you orient the smaller shapes. For example, if
you put the 4.875" (width) along the 29.125" (width) you can get 5.974
pieces by 5.161 pieces for a total of 25 with lots of left over space.
If you transvers the pieces so they're oriented length along width of
large rectangle, you'll get 28 pieces with little leftover space.

So with the following layout:

A1: 29.125
B1: 36.125
A2: 4.875
B2: 7
C1: =ROUNDDOWN(($A$1/$A$2),0)*ROUNDDOWN(($B$1/$B$2),0) (width/width)
C2: =ROUNDDOWN(($A$1/$B$2),0)*ROUNDDOWN(($B$1/$A$2),0)
(length/width)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
jlclyde
Guest
Posts: n/a
 
      6th Jul 2011
On Jul 5, 8:38*pm, GS <g...@somewhere.net> wrote:
> jlclyde presented the following explanation :
>
> > Hello,
> > I have been working on a formula that will calculate how many
> > rectangles will fit inside another rectangle. *I am stuck. *For
> > instance I have a rectange that is 29.125" X 36.125" and I need to
> > determine how many 4.875" X 7" rectangles I can fit inside to optomize
> > the original rectangle. *Any help woudl be greatly appreciated.

>
> > Thanks,
> > Jay

>
> It will depend on how you orient the smaller shapes. For example, if
> you put the 4.875" (width) along the 29.125" (width) you can get 5.974
> pieces by 5.161 pieces for a total of 25 with lots of left over space.
> If you transvers the pieces so they're oriented length along width of
> large rectangle, you'll get 28 pieces with little leftover space.
>
> So with the following layout:
>
> * A1: *29.125
> * B1: *36.125
> * A2: * 4.875
> * B2: * 7
> * C1: *=ROUNDDOWN(($A$1/$A$2),0)*ROUNDDOWN(($B$1/$B$2),0) (width/width)
> * C2: *=ROUNDDOWN(($A$1/$B$2),0)*ROUNDDOWN(($B$1/$A$2),0)
> (length/width)
>
> --
> Garry
>
> Free usenet access athttp://www.eternal-september.org
> ClassicVB Users Regroup! comp.lang.basic.visual.misc


Garry,
thanks for the reply. I need to know what the maximum number I can
get out of the larger rectangle. The smaller shapes could be
orientated any direction. Is there a formula that could determine how
many go length wise and how many go width wise?

Thanks,
Jay
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      6th Jul 2011
jlclyde brought next idea :
> On Jul 5, 8:38*pm, GS <g...@somewhere.net> wrote:
>> jlclyde presented the following explanation :
>>
>>> Hello,
>>> I have been working on a formula that will calculate how many
>>> rectangles will fit inside another rectangle. *I am stuck. *For
>>> instance I have a rectange that is 29.125" X 36.125" and I need to
>>> determine how many 4.875" X 7" rectangles I can fit inside to optomize
>>> the original rectangle. *Any help woudl be greatly appreciated.
>>> Thanks,
>>> Jay

>>
>> It will depend on how you orient the smaller shapes. For example, if
>> you put the 4.875" (width) along the 29.125" (width) you can get 5.974
>> pieces by 5.161 pieces for a total of 25 with lots of left over space.
>> If you transvers the pieces so they're oriented length along width of
>> large rectangle, you'll get 28 pieces with little leftover space.
>>
>> So with the following layout:
>>
>> * A1: *29.125
>> * B1: *36.125
>> * A2: * 4.875
>> * B2: * 7
>> * C1: *=ROUNDDOWN(($A$1/$A$2),0)*ROUNDDOWN(($B$1/$B$2),0) (width/width)
>> * C2: *=ROUNDDOWN(($A$1/$B$2),0)*ROUNDDOWN(($B$1/$A$2),0)
>> (length/width)
>>
>> --
>> Garry
>>
>> Free usenet access athttp://www.eternal-september.org
>> ClassicVB Users Regroup! comp.lang.basic.visual.misc

>
> Garry,
> thanks for the reply. I need to know what the maximum number I can
> get out of the larger rectangle. The smaller shapes could be
> orientated any direction. Is there a formula that could determine how
> many go length wise and how many go width wise?
>
> Thanks,
> Jay


I just gave you formulas for determining both orientations. You can
choose from the results which orientation to choose.

If you mean a mix/match of orientations (ie: some width, some length)
then I suggest using CAD software or hope someone who does shipping in
containers/trailers for some algorithms that you can use.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      6th Jul 2011
Just so you understand why I suggest using CAD software...

Some CAD/CAM software have utilities for figuring out the maximum yield
from a given size of material stock for given component size envelopes.
These can even be mixed size envelopes, yield different parts from the
same material stock. For example, a 4 x 8 sheet of aluminum would be
plotted to yield n pieces of part#a and n pieces of part#b, or any
number of other pieces so as to effect minimum waste of material stock.

The most typical usage would be EDM or plasma/flame cutting apps,
followed by CNC part programming software.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
jlclyde
Guest
Posts: n/a
 
      7th Jul 2011
On Jul 5, 9:43*pm, GS <g...@somewhere.net> wrote:
> Just so you understand why I suggest using CAD software...
>
> Some CAD/CAM software have utilities for figuring out the maximum yield
> from a given size of material stock for given component size envelopes.
> These can even be mixed size envelopes, yield different parts from the
> same material stock. For example, a 4 x 8 sheet of aluminum would be
> plotted to yield n pieces of part#a and n pieces of part#b, or any
> number of other pieces so as to effect minimum waste of material stock.
>
> The most typical usage would be EDM or plasma/flame cutting apps,
> followed by CNC part programming software.
>
> --
> Garry
>
> Free usenet access athttp://www.eternal-september.org
> ClassicVB Users Regroup! comp.lang.basic.visual.misc


Gary,
Thanks again for the clarification, but I do need the shapes to go
both directions. we currently have a software program that does this,
I was just wondering what the formula would look like in Excel. We
often change the parent size, which is stored in excel. Then we have
to plug the numbers back into the program to get the new number out.
I was hoping I could have it make the one change and be done with it.

Thanks,
Jay
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      7th Jul 2011
jlclyde brought next idea :
> On Jul 5, 9:43*pm, GS <g...@somewhere.net> wrote:
>> Just so you understand why I suggest using CAD software...
>>
>> Some CAD/CAM software have utilities for figuring out the maximum yield
>> from a given size of material stock for given component size envelopes.
>> These can even be mixed size envelopes, yield different parts from the
>> same material stock. For example, a 4 x 8 sheet of aluminum would be
>> plotted to yield n pieces of part#a and n pieces of part#b, or any
>> number of other pieces so as to effect minimum waste of material stock.
>>
>> The most typical usage would be EDM or plasma/flame cutting apps,
>> followed by CNC part programming software.
>>
>> --
>> Garry
>>
>> Free usenet access athttp://www.eternal-september.org
>> ClassicVB Users Regroup! comp.lang.basic.visual.misc

>
> Gary,
> Thanks again for the clarification, but I do need the shapes to go
> both directions. we currently have a software program that does this,
> I was just wondering what the formula would look like in Excel. We
> often change the parent size, which is stored in excel. Then we have
> to plug the numbers back into the program to get the new number out.
> I was hoping I could have it make the one change and be done with it.
>
> Thanks,
> Jay


Jay,
I guess, then, that whatever program you have that does this is what
I'm referring to. To reproduce what it does would require knowing what
algorithm[s] it uses. I doubt the author would release that info and so
why bother trying to dupe in Excel what you already have dedicated
software to do (besides licensing restrictions).

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
jlclyde
Guest
Posts: n/a
 
      9th Jul 2011
On Jul 7, 1:26*pm, GS <g...@somewhere.net> wrote:
> jlclyde brought next idea :
>
>
>
>
>
> > On Jul 5, 9:43 pm, GS <g...@somewhere.net> wrote:
> >> Just so you understand why I suggest using CAD software...

>
> >> Some CAD/CAM software have utilities for figuring out the maximum yield
> >> from a given size of material stock for given component size envelopes..
> >> These can even be mixed size envelopes, yield different parts from the
> >> same material stock. For example, a 4 x 8 sheet of aluminum would be
> >> plotted to yield n pieces of part#a and n pieces of part#b, or any
> >> number of other pieces so as to effect minimum waste of material stock..

>
> >> The most typical usage would be EDM or plasma/flame cutting apps,
> >> followed by CNC part programming software.

>
> >> --
> >> Garry

>
> >> Free usenet access athttp://www.eternal-september.org
> >> ClassicVB Users Regroup! comp.lang.basic.visual.misc

>
> > Gary,
> > Thanks again for the clarification, but I do need the shapes to go
> > both directions. *we currently have a software program that does this,
> > I was just wondering what the formula would look like in Excel. *We
> > often change the parent size, which is stored in excel. *Then we have
> > to plug the numbers back into the program to get the new number out.
> > I was hoping I could have it make the one change and be done with it.

>
> > Thanks,
> > Jay

>
> Jay,
> I guess, then, that whatever program you have that does this is what
> I'm referring to. To reproduce what it does would require knowing what
> algorithm[s] it uses. I doubt the author would release that info and so
> why bother trying to dupe in Excel what you already have dedicated
> software to do (besides licensing restrictions).
>
> --
> Garry
>
> Free usenet access athttp://www.eternal-september.org
> ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -
>
> - Show quoted text -


Gary,
I want to do this in excel because I do not want to have to go back
out of excel to calculate how many I can get out a parent size stock.
Thanks for your comments.
Thanks,
Jay
 
Reply With Quote
 
GS
Guest
Posts: n/a
 
      9th Jul 2011
jlclyde explained :
> I want to do this in excel because I do not want to have to go back
> out of excel to calculate how many I can get out a parent size stock.


Jay,
Yeah, I can understand that. The software I use (SolidWorks) supports
'Design Tables' which are Excel spreadsheets, and so this is
integrated. I'll see what I can find out about how this is done...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterate through shape's master shapes Beautiful Piotr Microsoft Powerpoint 3 15th Feb 2010 02:18 PM
Can I use VBA to assign Macro to Shape within a Group of Shapes? MikeZz Microsoft Excel Programming 1 28th Jan 2009 01:25 AM
Determining whether a PPT shape has other shapes within it Dale Fye Microsoft Powerpoint 3 22nd Mar 2008 12:03 PM
Goruping shapes into one shape bcrane Microsoft Powerpoint 4 14th Dec 2007 05:31 PM
Change one shape by clicking on series of other shapes CompleteNewb Microsoft Powerpoint 2 7th Jan 2007 12:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:39 PM.