TheSwamp

Code Red => VB(A) => Topic started by: JayRem on December 15, 2004, 02:40:42 PM

Title: Counting Sheets
Post by: JayRem on December 15, 2004, 02:40:42 PM
I draw wall elevations for large commericial buildings and am looking for a way to get a count of how many sheets out of stock 4' x 8' material it would take to cover the panel....Sorry it's still confusing.  What I have is an outline of the wall section which may have a mandoor or a window opening in it and I have rectangles representing 4' x 8' stock material.  Now sometimes in order to get the least amount of waste the sizes will vary.  I need to count each sheet and see if it can fit with another and so on until I get a total number of 4' x 8' material to the closest half sheet.  I have written programs that calculate simply off the area but I cannot find a way to do it by basically a form of rectangular nesting.  I imagine this process can be very difficult.  I was just wanting to see if anyone has any ideas of where I should start.  Thanks in advance!
Title: Counting Sheets
Post by: Keith™ on December 15, 2004, 07:47:25 PM
Difficult indeed ....
Title: Counting Sheets
Post by: JayRem on December 16, 2004, 09:12:12 AM
any suggestions :shock: ???
Title: Counting Sheets
Post by: Keith™ on December 16, 2004, 10:34:25 AM
It would have to be a custom program, the main issue would/could likely be solved with an algebraic equasion but it would have to be looked at using a sample drawing and likely lots of testing. I don't think anyone here has something already handy based on the fact that no one here has jumped on the bandwagon by posting links of snippets of code. If you give it some time, perhaps the solution will materialize, or you could contract someone to do a program for you...either way, if it saves you time, it will be worth it since time=money
Title: Counting Sheets
Post by: CAB on December 16, 2004, 10:42:33 AM
JayRem
You have not indicated how you do it exactly. Also you have not defined any parameters.
Like:
Can the 8 foot side of the panel be horizontal and / or vertical?
Can you break the pattern at floor levels or some vertical point?
Do the 4 foot sides have to be staggered?
Is there a structural or aesthetic requirement to the placement?
Are expansion joints going to be used?
Does the material recovered from an opening have to be a minimum size before it can be reused?
Do you have to start at one side or bottom with full size panels?

That is just off the top of my head, I would have to ponder the problem awhile to complete
the list of questions?

So you see your question is too vague for an answer.
Even with all these options known the problem is complex and would have to have some priority
to the method used. That is unless the only criterion is the minimum waste.
My thought is that the solution is too complex for someone to invest the time without some incentive.

My 2 cents. :)
Title: Counting Sheets
Post by: CAB on December 16, 2004, 10:43:49 AM
Keith
You are just too fast for me :D
Title: Counting Sheets
Post by: Keith™ on December 16, 2004, 10:52:44 AM
Well ... you know I don't have anything else to do but surf in the swamp ... could be a new sport ... swamp surfing ... now where is my wetsuit ...
Title: Counting Sheets
Post by: whdjr on December 16, 2004, 10:55:29 AM
Better get one that is gator resistant. :D
Title: Counting Sheets
Post by: CAB on December 16, 2004, 11:01:50 AM
Oooh
A new product.
Kevlar wet suit, Shark & Gator Resistant.
Title: Counting Sheets
Post by: Keith™ on December 16, 2004, 11:03:31 AM
Yep and we could coat it with goretex ... that way hendie might have a little more work to do ...
Title: Counting Sheets
Post by: Anonymous on December 16, 2004, 01:07:00 PM
Alright guys,  well in answer to most of your questions.  I'm not worried about expansion joints or staggering.  Maybe this will help to explain myself.  I have already drawn in the 4' x 8' pieces of material that I want to use.  Now I have those on a certain layer so that I could try and take them all and try to fit them together so that I could put two 1' x 8' sheets with a 2' x 8' sheet and my total would be up to 1 total sheet out of a 4' x 8'.  So I'm not really to concerened.  I already have it drawn I just need a way to take what I have drawn and be able to "count up" how much material I'm using.  Does that help clear some questions.  

-Kieth you think this could be done with an algebraic equation??  Are ya talkin' about using maybe area??  or getting the bounding box of each piece.  Iv'e kinda messed around with those.  I'm just starting to think that this type of program is too difficult to be handled......
Title: Counting Sheets
Post by: JayRem on December 16, 2004, 01:08:09 PM
Sorry I forgot to login so that Guest was just me!!
Title: Counting Sheets
Post by: Keith™ on December 16, 2004, 01:11:33 PM
no it wouldn't be too difficult to handle ... but likely not something that someone would want to do for free.... does that make sense? As far as an algorithm is concerned .. what I was thinking of was a way to remove all objects with 32sf sort the remaining by size, match to an appropriate size to get the best use of the material and remove them until there is none left to remove.

there will need to be lots of error checking I would imagine ... but I have been known to be wrong ...

If it doesn't get answered here, you can always try one of the for fee services of the various members here .... look here for some of them.

http://www.theswamp.org/cadl.html
Title: Counting Sheets
Post by: CAB on December 16, 2004, 01:51:40 PM
JayRem
IF you have already drawn the panels and if they were drawn with plines on a separate layer
you could process the counting using lisp.

Pseudo code:
Code: [Select]
ssget the plines on layer X
step through the selection set
  separate the sizes into separate list
     4x8 list
     4x4 list
     2x8 list
     1x8 list
     2x4 list
     1x4 list
    If a panel is less than 4x4 & larger than 2x4 it would go in the 4x4 list
  Whole panels equals the 4x8 count
  Add (fix (/ 4x4count 2)) to Whole panels
  setq 4x4count to the remainder
  Add (fix (/ 2x8count 2)) to Whole panels
  setq 2x8count to the remainder
  Add (fix (/ 1x8count 4)) to Whole panels
  setq 1x8count to the remainder
  Continue for each group
 
  Then combine the remaining groups to full panels
  Add to Whole Panels
  Round up the remaining groups
  Add to Whole Panels
 
  There you have it.
Title: Counting Sheets
Post by: JayRem on December 16, 2004, 02:12:32 PM
Thanks guys I'll give it a shot however.  I'm much more expierenced in VBA then I am at all with lisp but I work with a guy who can handle lisp pretty well.  I just did not know where to start I'll let ya know of any progress if I have any at all.  And I wasn't trying to get free code out of someone, I just wanted a direction of where to head.  

thanks,
Title: Counting Sheets
Post by: CAB on December 16, 2004, 02:57:58 PM
JayRem
You are welcome and there is plenty of free code to be had here at the swamp.
The hard part is placing the panels and you have already done that.
Hard for a computer program that is and not so hard for a human being.
The counting is a little complex but can be done by any experienced lisp or VB
programmer.

If you need some help along the way don't hesitate to ask.
Keith will help you out. hee hee hee 8)
Title: Counting Sheets
Post by: Keith™ on December 16, 2004, 04:36:05 PM
I will help as I can .. I'll be out of town for the next 2 weeks starting on Saturday ..... so before then anything is game....

Anyway ...

JayRem, just keep in mind the old proverb about teaching a man to fish andgiving a man a fish ... we try to help, but unless something is already done, most here will typically offer help to get you to your goal. If someone offers a full fledged program wel then you are a lucky person...we all benefit in the end ...good luck...
Title: Counting Sheets
Post by: JayRem on December 16, 2004, 05:13:34 PM
Well I'll keep truckin' along wether I get or not I still have to work!!  ahhh
anyways I came up with a new question I'm gona post so have a good vaca!!