Author Topic: lisp request for cnc scrap utilization  (Read 6644 times)

0 Members and 1 Guest are viewing this topic.

uncoolperson

  • Guest
lisp request for cnc scrap utilization
« on: August 11, 2010, 05:06:03 PM »
I've been outta the game for awhile, I intend to give this a go but figured I'd see if someone had something similar first.

looking for a lisp that will take a block, and search through a drawing to see what blocks it might fit in.

got a bunch of cnc scrap that gets thrown away, figured it'd be neat to have a way to automate seeing if something can be made of the scrap of something else. Just and idea I had while watching stuff get thrown away.

added bonus I just thought of it would probably up my "hey look I'm awesome, you want me to keep working here while I go to school"

<edit: title by CAB>
« Last Edit: August 11, 2010, 08:00:41 PM by CAB »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: lisp request
« Reply #1 on: August 11, 2010, 05:49:58 PM »

If you change the thread title and write a decent specification for what you want you'd stand a better chance of finding contributers.

A point in your favor is that you didn't make this a {*Challenge*}  :wink:
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Lee Mac

  • Seagull
  • Posts: 12921
  • London, England
Re: lisp request
« Reply #2 on: August 11, 2010, 05:50:33 PM »
Cutting routines are pretty complex to be honest, as there are so many combinations and orientations to consider - I suppose you could quickly compare areas to weed out the obvious, but the subsequent testing may be tricky...

uncoolperson

  • Guest
Re: lisp request
« Reply #3 on: August 11, 2010, 06:16:15 PM »
A point in your favor is that you didn't make this a {*Challenge*}  :wink:

I gotta be honest... I'm busy and lazy and not quite smart enough.

....but the subsequent testing may be tricky...

that's the part I don't have a good idea of how to approach.

Lee Mac

  • Seagull
  • Posts: 12921
  • London, England
Re: lisp request
« Reply #4 on: August 11, 2010, 06:25:50 PM »
....but the subsequent testing may be tricky...

that's the part I don't have a good idea of how to approach.

For my first glance, I would deem it pretty tough, but I would be inclined to find perhaps the center of the boundingbox of both objects and place the block at such center (roughly) of the enclosing object, then perform a few rotations until you perhaps find that the two objects don't intersect each other for some rotation. (but of course there are infinitely many rotations and positions - depends on the accuracy you want I suppose).

Then there is the accuracy of the intersectWith method when used with blocks - this can be often temperamental. Perhaps create a boundary polyline surround the block and use this for testing? (Also, using the boundary polyline, you will have a definite Area property to play with).

Just throwing a few ideas out there.

Lee
« Last Edit: August 11, 2010, 06:46:45 PM by Lee Mac »

johnm

  • Guest
Re: lisp request
« Reply #5 on: August 11, 2010, 07:24:43 PM »
If the scrap is rectangular (square) then you can just test the x&y distances of the scrap vs. the x&y distances of the block then flip the x&y of the block and test it again.
Once you get into weird shape scrap then you’re into some advanced math and getting into nesting hell. I have attempted to write a nesting program but I ran out of beer
The beer justifies the headache because I knew I was going to get one anyway

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: lisp request for cnc scrap utilization
« Reply #6 on: August 11, 2010, 08:03:04 PM »
Wow and no blocks to test with.  :?
Blocks in a DWG would at least get someone started.  8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: lisp request for cnc scrap utilization
« Reply #7 on: August 11, 2010, 08:15:21 PM »
I got started but ran out of beer  :-D (going with rectangle blocks)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

hugha

  • Newt
  • Posts: 103
Re: lisp request for cnc scrap utilization
« Reply #8 on: August 11, 2010, 08:25:50 PM »
There's a slew of CNC nesting solutions on the market.

This survey could give some leads (caveats: it's PDF and a bit old):

http://www.striker-systems.com/NewsAndEvents/PDFs/form&fab-May2002.pdf

uncoolperson

  • Guest
Re: lisp request for cnc scrap utilization
« Reply #9 on: August 11, 2010, 08:44:33 PM »
Wow and no blocks to test with.  :?
Blocks in a DWG would at least get someone started.  8-)


sorry, this was a spur of the moment idea walking by the cnc machine, I posted this about 5 minutes after the "hey that'd be nifty" moment.... I believe their data sets can be converted to dxf (not sure)... just running with an idea at this point.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: lisp request for cnc scrap utilization
« Reply #10 on: August 11, 2010, 09:00:16 PM »
From a practical application Point of view :
One of the criteria for an effective solution is suitable data.
Make a coffee and think about how you would keep an up-to-date database of available offcuts and how you'd guarantee that the offcut would be available when the worksOrder hit the machines.

I'm not trying to spoil your  "hey that'd be nifty" moment, just inserting a little reality.
There is more to writing good software than just hacking acceptable code.
 :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8755
  • AKA Daniel
Re: lisp request for cnc scrap utilization
« Reply #11 on: August 11, 2010, 09:18:07 PM »
What's it for?  Are you using a stock material?
I've really been wanting to do a sheet optimization routine for a while now,  just not smart enough  :mrgreen:

Speaking of smart, doesn't master Evgeniy have something? see

http://elpanov.com/index.php?id=69

look at item 7 on down

uncoolperson

  • Guest
Re: lisp request for cnc scrap utilization
« Reply #12 on: August 11, 2010, 09:55:28 PM »
From a practical application Point of view :
One of the criteria for an effective solution is suitable data.
Make a coffee and think about how you would keep an up-to-date database of available offcuts and how you'd guarantee that the offcut would be available when the worksOrder hit the machines.

I'm not trying to spoil your  "hey that'd be nifty" moment, just inserting a little reality.
There is more to writing good software than just hacking acceptable code.
 :-)

I understand the reality, I believe at my company if something hasn't been done to address this (again, haven't asked around). I could easily convince someone to get me data that could be used.

as for an up to date database, I was thinking of going with a directory of dxfs or something that would be created either me or automagically using the data used by the cnc operators. The company is big enough this would be useful, but small enough I could make this happen.

the execution I should be able to manage, some time within the next week I intend to look into the actual functioning.

uncoolperson

  • Guest
Re: lisp request for cnc scrap utilization
« Reply #13 on: August 11, 2010, 10:00:19 PM »
What's it for?  Are you using a stock material?
I've really been wanting to do a sheet optimization routine for a while now,  just not smart enough  :mrgreen:

Speaking of smart, doesn't master Evgeniy have something? see

http://elpanov.com/index.php?id=69

look at item 7 on down


we cut stuff out of composite honeycomb panels with stuff on it (usually standard setups for the stuff on it and the thickness[ ie. reusable]).

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8755
  • AKA Daniel
Re: lisp request for cnc scrap utilization
« Reply #14 on: August 11, 2010, 10:13:54 PM »
There are a few programs on the market for the cabinet industry that can help with this.. one being cadcode, @ www.cadcode.com .  These programs can help manage sheet stock, generate g-code, generate bar-coding for the CNC operator,  and generate part labels....

honeycomb panels, particle board.. the software does not care.