PDA

View Full Version : CNC-DXF Graphics to toolpath explained



threephase.biz
02-06-2005, 02:09 AM
Here is how I get my CNC router to do what I want. I'd bet 6-pack it's the same for a mill. Simplified somewhat and targeted to 2-dimensional.

Graphics- there are basically 2 kinds of graphics-

1) Bitmaps (jpegs, gifs, png...) these are what you see when you go to a website- usually jpeg or gif. These are made like your sunday newspaper or tv pics- a bunch of dots. The larger the image, the larger the file- more dots. If you enlarge image, you get "jaggies"- straight lines appear jagged- NOT good for a toolpath! You'd use Photoshop to fool with these. Your digital camera takes these. Sometimes called raster. We won't concern ourselves w/ these for now.

2) Vector (DXF,AI,EPS,CMX...)- This is what we want to use. A vector is like a recipe of cartesian (X,Y) coordinates. Example: Start of line is at 3,0 and end of line is at 7,8 . Obviously, things get hairy fast when you start adding complex curves. The beauty of these is that they can be scaled (enlarged or shrunk) without affecting the crispness. They also are small files, so email great. They won't show up in a web browser, tho. This is alot closer to G-Code, but close 'aint good enuff.

There are alot of ways to skin this cat, so it might be a bit confusing. We'll see what I can do to muddy it up. Here is what those letters above mean:

DXF- AutoCad uses a DWG as it's native output (actually a database), but Autocad keeps coming up w/ versions & features- all of which don't translate well to other programs that might have to read it. So, they came up with Drawing Interchange file format (DXF) has been defined. All implementations of AutoCAD accept this format and are able to convert it to and from their internal drawing file representation. AutoCad is expensive & powerful. Steep learning curve. There are cheaper or even free cad programs that'll generate the same output, but this is the king. AutoCad is very precise- if you use the command line to tell it to draw a line from 0,0 to 4,4, it'll do just that.

EPS- (Encapsulated Post Script) Is actually something they use alot in the print world & can be a combo of raster & vector, but we'll just concern ourselves with the vector component. Told ya' it'd get muddy. More on this in clipart section.

AI- Adobe Illustrator format- this is a drawing program that's great for manipulating and creating. Much easier to get started than Autocad, but not as precise. If you want to get creative with curvy text, this is the one. You'll need to add something to the program called a "plug-in" for saving & reading some formats for best results. A Plug-in is a third-party component that lets Illustrator export DXF files, for example. I use EXDXF Pro to export my files.

CMX- Corel Draw- Like Adobe Illustrator, for the most part- different company. Also Macromedia Freehand is another. Reason I mention is that there is alot of clipart in CMX format available. I use Xara (Corel bought 'em) to translate these to EPS for Illustrator as I don't have (or want) Corel Draw on my box.

Clipart- is canned images most commonly found in EPS, AI or CMX format. If you want to mill a "Ford" logo into somthing, you want it to look perfect. It'd take a long time to get that "Ford" script-font to look just right in AutoCad or Illustrator. It'd take alot longer to draw that Calvin pissing, too. You can buy disks full of images & logos that you can use to get started, then make your changes from there. The beauty of clipart is if you just need an image of say, a shark, but can only find a deep-sea fishing scene, you can just swipe the shark and delete the rest easily. Sometimes all the componets will be "grouped" together- so you'd hi-light (or select) the scene & hit "ungroup". this would break it up into it's components, allowing you to grab just the shark. I'd do these mods in Illustrator. Then add the text I want & export as a DXF file.

You'll see clipart on ebay using words like: VECTOR CLIP ART VINYL PLOTTER CUTTER. NOT photos!
http://listings.ebay.com/aw/plistings/category26254/index.html
or, if you are stashing your cash for a mill like me, free is good, too.

http://search.dmoz.org/cgi-bin/search?search=eps&all=no&cs=UTF-8&cat=Compu ters%2FGraphics%2FClip_Art (http://search.dmoz.org/cgi-bin/search?search=eps&all=no&cs=UTF-8&cat=Computers%2FGraphics%2FClip_Art)

Because clipart comes in so many forms, sometimes you'll have to import & export it using a few of these above programs (or their equivalents). It won't be enough to try and open a non-native format. Go down to file>>Import or File>> Export, then save as... Vector Clipart doesn't degrade when it's imported/exported like bitmaps do, for the most part. Just regen your drawing prior to output for best results.

Having oodles of clipart is great, but what good is it if you can't find that Chicago Blackhawks insignia ( you remeber hockey?) when you want it. I use Extensis Portfolio (and Thumbs Plus for CMX) to keep 'em organized as Windoze won't display them all as thumbnails.

There are other programs that will translate file formats, too. If you've got to get that jpeg picture converted to a dxf, than something like AlgoLab Raster to Vector Conversion Toolkit is the way to go. Pictures need some futzing to look right, though. They have a full demo (it'll expire after awhile) that lets you try b4 you buy.

They say: "AlgoLab Raster to Vector Conversion Toolkit converts architect, mechanical and various technical drawings, maps and other types of line artwork from raster to vector formats. This means that a paper drawing can be scanned, line artwork automatically recognized and represented in a vector format that then can be imported to your CAD or drawing program."
download free demo: http://www.algolab.com/files/r2vtool.exe

I also use a CAM program, too- SurfCam. MasterCam is another biggie. Once you have your dxf file, you import it into SurfCam and it'll show you graphically a simulation of what the toolpath will do- cheaper than buying material or cutters. If you want to do that Ford logo, but hollow out the oval leaving the Ford text raised, this is what you'd use to generate needed toolpath. CAM programs can directly control your machine if you have the correct "post processor" for your control. If you've got a FANUC/GE 18T Control, than you'd need the specific post processor in order to generate G-code from the cam program directly. You may need to customize the post for any tool changer, etc. or other options you might have.

Custom posts can be written by a pro, for a one-time fee. Some of these will also control lathes. If you purchase SurfCam, they have many pre-written posts that are available for registered users only- it's how they combat piracy.

3-D: CAM software is a nessity for 3-D contouring & learning curve gets a bit steeper. In AutoCad, you use layers, which are like those anatomy books where you peel back the layers of the body on those transparent pages- first the skin, then muscle, exposing skeleton.... ( sounds like me using the grinder after too many beers!) Layers in AutoCad can be used to show what happens at different depths of Z axis. Much more on this for me to learn b-4 I can try to explain.

So, here it is- CNC milling explained by the guy who doesn't even have a manual mill yet!

Oh, yeah- I promised Mochinist some flames for a clock- These were EPS graphics originally.

http://threephase.biz/dxf/flames.jpg

Door # 1: http://threephase.biz/dxf/flame1.dxf
Door # 2:http://threephase.biz/dxf/flame2.dxf
Door # 3: http://threephase.biz/dxf/flame3.dxf

Alot of good CAD/CAM software links & misc G-code stuff.
http://www.freebyte.com/cad/cadcam.htm#cadcamsystems


[This message has been edited by threephase.biz (edited 02-06-2005).]

lornetw
02-15-2005, 01:54 PM
You can download a free version of a program called WinTOPO (Google for it).
I've used it a few times - works well - and it's free (there's also a Pro version for heavy-duty users).

Smokedaddy
02-15-2005, 11:47 PM
Just for information sake,

You can also learn AutoLISP and generate your own g-code. You can purchase a totally 100% functional student version of AutoCAD for roughly $150.00 to $325.00, depending if you want a perpetual license agreement or a 1 year license.

-SD:>0