PDA

View Full Version : Toolpath optimizations



mrdovey
02-11-2005, 10:00 AM
This past week I made a 2D drawing in DesignCAD and exported it as a DXF, then used the FC command in SBCut to turn it into an SBP file.

The SBP file raised the tool, moved to the starting point, lowered the tool, and made a cut. Then it raised the bit and performed the same sequence for another part of the job thirty-three times to cut four closed curves. My trusty PRT spent more time jogging than cutting.

This isn't, of course, the first time I've had this experience; but this time I finally got tired of the inefficiency and decided to do something about it.

Last night I coded a utility that reads 2D SBP programs, consolidates fragmented toolpaths, and re-orders the consolidated toolpaths to minimize the amount of time spent jogging.

My thirty-three toolpath segments are down to four and I'm looking foreward to not having to put up with hunt-n-peck cutting jobs any more.

It's a good day and getting better! (-8

...Morris

ron brown
02-11-2005, 11:58 AM
Sounds like Vector.

Ron

mrdovey
02-11-2005, 12:21 PM
Ron...

I dunno (never used or even seen Vector) but I think I'm going to enjoy watching my machine zip through some of the stuff that was painful to watch before. It was the fragmentation problem that's had me hand-coding all of my production part programs. I think I'm going to have to start on some modifications to handle 3D (2-1/2D?) cutting and to take notice of VC commands so that I can do similar optimization of programs using multiple bit sizes.

The problem with writing code to do this kind of job is that it's always hard to call it "Done."

...Morris

paco
02-11-2005, 01:53 PM
Hi Morris!
I wonder; why were your 4 closed curves fragmented to more than 4 toolpath (assuming that your are cutting 'em with only one pass)? Were your original CAD designed curves not closed vectors? Is this the resulting toolpath of the FC command?

mrdovey
02-11-2005, 06:37 PM
Paco...

The curves were a number of connected curves with endpoints shared between adjacent curves. They were closed vectors exported from DesignCAD in DXF format and converted to SBP by the FC command. The number of original curves were fewer than the number of segments that came out of FC conversion. I'm not sure where the fragmentation ocurred - my first opportunity to look was after the SBP file had been produced. Very ugly!

Anyway, the file generated by the toolpath optimizer ran smoothly (and correctly!) this afternoon. I ran the code with a 1/32" bit and the result looked pretty good.

This relates somewhat to our earlier discussions of moldings in that I had wanted to design the cross sectional profiles using my DesignCAD package; and feed that code to the molding software - but the various profile elements were frequently fragmented and the separate pieces of the profile were a mixture of right to left and left to right elements. This utility will take care of not only the fragmentation; but will ensure that the senses of all of the profile elements are the same - a major improvement.

...Morris

paco
02-11-2005, 07:31 PM
Humm...
I did'nt get such from my DXF (from Insignia)...!? Maybe the vector(s) original's "start" points were not all oriented the same (left to right or right to left; clockwise or unclockwise)... are you using SB 2.39 (DOS)?

Pictures?!

mrdovey
02-11-2005, 07:54 PM
Paco...

Oops. Sorry - the work left the shop immediately it was finished. Here's a screen shot of the Logo:

.

...Morris

mrdovey
02-11-2005, 07:59 PM
Paco...

Even more sorry. The image was all of 6.7kb - too big for the forum. Take my word: you're not missing anything.

...Morris

beacon14
02-12-2005, 01:03 AM
Morris,

I also use DesignCad and have noticed a quirk that may or may not be a source of your problem. If you have a line (or lines) connected to an arc (or arcs), and use the Combine Lines command to connect them (in order to create a single offset line for a toolpath, for instance) the smooth curve of the arc is broken down into short line segments. There is no way to make them revert to a curve that I know of, and the offset line will be segmented as well. You can't tell unless you use the Break Line command or zoom in real close - the segments are small enough to look like the original smooth curve on the screen.
I don't know of any other functions or commands that break curves like that, but if there is one there may be more.
Any chance that could be part of the original problem?

gerald_d
02-12-2005, 02:20 AM
A couple of the low-end CAD programs chop curve segments into little straight lines. Some do it so badly that the ends of the little lines don't meet exactly, and then the SB tool pulls out and plunges again, thinking that you really wanted this break between the lines.

With the better programs, curves are retained and segments join exactly - makes for short .sbp files (with a single CG commands for each curve*) and efficient tool moves. But they spoil all the "fun" that Morris is having


* In this sense a curve has a fixed radius.

mrdovey
02-12-2005, 02:40 AM
Dave...

I don't really know; but I'm willing to believe it is. Actually, even without that behaviorism I'd probably have had problems because I don't usually add drawing elements in the order or direction that I want cutting done - so if it weren't the software it would be me.

It may partly be the old problem of needing software that gives me what I really want rather than what I /said/ I wanted. d-8

At least (for now) it's a solved problem. (-:

...Morris

mrdovey
02-12-2005, 03:02 AM
Gerald...

My copy of DesignCAD is about six years old - and it's probably been improved considerably since I bought it (to replace the company's earlier pre-Windows 2D product). My version was definitely not designed with CNC tooling in mind.

But then I didn't have CNC tooling in mind when I got it. I'd simply wanted a drafting capability so I could plan woodworking, machine, and building projects - and it worked well for those projects.

And you're right that I've been having a certain amount of fun using the 'Bot as a 3D plotting device. It's a good thing it's only 3-axis machine - with a 5-axis machine I'd /never/ get any work done. (-:

...Morris

mikejohn
02-12-2005, 03:19 AM
Gerald
If I draw a true arc in AutoCad, and convert the .dxf file in Shopbot software (convert FC?), how will the shopBot treat the arc?
..........Mike
Congratulations.........to the rain dance team!!

gerald_d
02-12-2005, 05:51 AM
Mike, it is literally years since I last used the FC command, but I remember that it was one .sbp command for one true arc. If you had drawn a square and then filleted the corners, the .sbp file effectively had 8 cutting moves (4x M3's and 4x CG's).....

.....plus a whole lot of "ups" "downs" and jogs above the job, because it would cut the four straight sides first and then go back and cut the curves in the corners. Exactly in the sequence that you draw the segments.

Those Zulu dancers are darn good!

mikejohn
02-12-2005, 06:01 AM
Gerald
Ok, what do I do in Autocad to make it cut straight line,curve,line,curve etc without ups and downs and jogs?
I remember they were also good at bad light dances earlier in the year!
.......Mike

gerald_d
02-12-2005, 07:00 AM
Two choices:

1. Play some tunes in AutoCAD. You can use polylines ("Boundary" command, etc.) to join the lines in a logical sequence, but that only addresses the first headache. Next headache is to tell AutoCAD that you want decide the direction (climb vs conventional cut). And then you want to tell it that it must start in the top right corner, and not just at any random spot in the "boundary". ......And then then you also want to tell AutoCad to join ends of lines together that happen to be within a defined distance of each other, and ignore the potential break that they might have caused. Oh, and then you still want to write the .sbp file....plus preview the cutting on screen....plus calculate a run time....plus add in some commands to turn the router and dust collector off. Or....

2. Get CAM software. PartsWizard will do some of those steps. Vector will do all the steps.

mikejohn
02-12-2005, 07:32 AM
I can do it manually.
By copying and saving in order, I can get it to cut in order. By mirroring I can go climb or conventional. With fore thought I can start at the right point on the boundry. Normally the 'boundry' or 'region' command sorts out breaks.
And the FC commands converts.
I can achieve the .sbp file I want by careful use of AutoCad. Will PartsWizard or Vector do lots of this for me?
...........Mike

beacon14
02-12-2005, 10:40 AM
Before there was PartWizard I did all those things in DesignCad. I would offset my part edges for the toolpath, then in a new layer trace each toolpath element in order (the direction of cut will go from the first point you set on the element to the next, and so on to the last point of the element); then erase the old layer leaving only my perfect (!?) toolpath. By using a different color for each depth of cut, you can control depth of cut and create multiple passes.

Part Wizard II does pretty much all of this, way faster. I haven't drawn more than one or two toolpaths in DesignCad since I started using PWII. Also, since I don't have to combine the lines and curves to do the offsets in DC, my curves stay as curves and my final toolpath is made up of arcs where appropriate.

By the way, when using FC to convert a circle from a .dxf file, I would always end up with 4 arcs, each cutting one quarter of the circle. At least they were in order, with no Z moves in between, so it cut like a circle.

Morris, the DC upgrade is pretty affordable (well under $100 I think), and well worth it if you are still using DC8 or DC for Win95, or some other ancient version.

gerald_d
02-12-2005, 11:36 AM
Mike, if we have that filleted square open in Vector, we make a mouse click at the point where we want the cut to start (or end) and then Vector changes all the lines to red and puts an arrow head in the center of each line segment. Therefore, with a single click we have 1. starting point, 2. sequence, 3. direction, and 4. a visualization of the path (if we then change our mind about the direction, an F-button turns it all around). Nothing can be simpler than this. (Except that Vector's manuals and support could never convince its users of its simplicity).

mikejohn
02-12-2005, 11:49 AM
So I draw in AutoCad, import to Vector, make my cut order,direction and start point decisions. Do I put tool offset in AutoCad or Vector?
.........Mike

gerald_d
02-12-2005, 12:35 PM
Your choice - we do the offset in AutoCAD (with OFFSET after BOUNDARY).

Since you are a dyed_in_the_wool AutoCAD man, I would suspect you would lean to do more in AutoCAD than in the CAM program. Similar to us.

srwtlc
02-12-2005, 01:14 PM
Mike, in Vector you take that same filleted square and with about two more clicks and an entry of the amount of offset desired you have the offset done. A couple more clicks and you have a cutting file ready. If you use the little Macro Tool Bar Pro program with it, you can do several thing with one click.

Gerald, "Except that Vector's manuals and support could never convince its users of its simplicity". I'm hoping that VectorXT's version 10 manual is a little better! I'll find out when my upgrade shows up later this month.

mikejohn
02-12-2005, 01:23 PM
Software manuals are printed with special ink.
When you first try to understand them, they are written in something akin to ancient greek.
When you are familiar with the programme, and begin to understand it a bit, you go back to the manual, all the words have moved around and changed, and they now make perfect sense.
.........Mike

gerald_d
02-12-2005, 01:35 PM
Vector was developed by a Dutchman, in Dutch. (Seriously). The manuals were poorly translated, and some Dutch still appears in the manuals and on the help screens. Sentence constructions are clumsy to English speakers, but herein is my advantage of being fluent in Afrikaans - the Dutch comes naturally to me.

IMHO, the biggest mistake of the Vector people is to tout it as a full blown CAD/CAM package - they just do not seem to realise how far they fall short of a CAD program like AutoCAD

Brady Watson
02-12-2005, 08:24 PM
After getting dropped from the ShopBot line-up, I think that the majority of Vector's customers are now hobby-based. Many hobbiests don't need or want the added features (or confusion depending on perspective) that AutoCAD brings to the table. While Vector is very capable, powerful and good tool, I think that the interface is very unfriendly compared to PartWizard & the rest of the DelCAM lineup.

Yeah...know what you mean. Many of them including BobCAD seem to be clueless. After you see a REAL CAD or CAM package (or both) it makes a lot of them look like they are resting on their laurels a la 1987...

-Brady

btk
02-12-2005, 09:39 PM
Mike,

For a part, I created 4 components in Autocad (4 edges of a part consisting of 2 vectors and two arcs)

I was pleasantly suprised that the Arcs created in
Autocad were converted (using FC) as CC Commands (however not CG commands as mentioned above)
Resulting in a very short file considering all of the movement.

CC,326.0012,T,1,344.997,15.000,,1
M2,91.4544,32.5000
CC,334.0012,T,-1,15.000,344.997,,1
M2,6.0355,28.6340

However the Arcs were only 30 degrees, so I do not know what would hapeen past 90 degrees.

mikejohn
02-13-2005, 02:20 AM
I drew a straight line (vector) in Autocad 2000 from 0,0,0 to 300,300,50 (mm) and converted it using FC.
I get this

SA,
&ZUP=0.5000
JZ,&ZUP
J2,0.0000,0.0000
MZ,0.0000
M2,300.0000,300.5000
JZ,&ZUP
PAUSE 2

I get a line on the Z zero plane (which is what line 6 says, with the addition of the .5 in y).
I converted first in 3D then 2D, same result.
I tried saving in release 12 and release 14.
If I edit line 6 to M3 and the desired end point,(300,300,50) the simulation behaves as I wish.

Any ideas what is happening?
Can someone try it going from AutoCad to .sbp via a CAM program? I would appreciate it if you can.
..........Mike

gerald_d
02-13-2005, 06:01 AM
Mike, when I last looked at the FC thing, there was a choice of whether one was working with 2D+colours, or 3D. If it still works like this, then it looks like you picked the 2D option.

Yesterday I did a format c: on my home computer - tomorrow I start teaching it some sense again. So I can't show you some real results today. However, from memory, a Vector output would be something like this: (if 70 is set as the "safe height")

J3,0,0,70
M3,0,0,0
M3,300,300,50
J3,300,300,70

with 4 decimal places.
Vector only uses J3, M3 and CG commands.

mikejohn
02-13-2005, 07:45 AM
Gerald
Why did you format c:?
The reason I ask is, my computer had a nervous breakdown a week ago. Something ate all my .dlls, and I had to re-install everything. It took the best part of a day. I guess I picked up some sort of virus that got through the the firewall and security software undetected. Is it possible it came via a link on the forum, I ask myself.

I tried 2D and 3D with the same result.
The words colour and depth are in the window, but no boxes to fill.
Mind you, a single line is a single colour.
I was looking at an answer you gave in another thread, concerning corners in v carving, where you introduced such a line.
cricket is now most definately a taboo subject,although doesn't Pietersen sound like a South African name to you?
........Mike

gerald_d
02-13-2005, 08:45 AM
Pietersen sounds, and is, SA-born.

Formatted because the new PC runs too fast for Win98 and was forced to go to something else (XP in this case). But I also enjoy a format c: from time to time....

Diagonal 3D lines are not so rare that you should remember them from thread to thread. Take also the case of plunging a cutter that refuses to go straight in - where the central core will not "drill". We sometimes have to "wobble" (zig-zag) them into the job if there isn't enough room for one long "ramped" entry.

rhfurniture
02-13-2005, 03:23 PM
Mike,
I have lsp routines to convert all manner of vectors to a single 3dpline with start end and erase old options, also one to turn vectors that wont cooperate with the above (splines & arcs) into 3dpline, and another to save it as an R14dxf which I find invaluable for doing Acad 3d>dxf>sbp work.
Email me ralph@rhfurniture.com (mailto:ralph@rhfurniture.com) if you want them.

Ralph.

larry_k
09-02-2005, 05:14 PM
sorry for posting here but I dont know and tryed to start a new posting.(I am looking for good file for prop for windmills or aka wind genration.) I seen a post on this a long time ago from some one in oragon. I would like to lean more.