# How do I create gCode from a 3D image



## eskimobob (Sep 17, 2009)

I'm quite new to CNC so bear with me.

I have got EMC running on Linux controlling my rebuilt Denford Triac. I have created a DXF file of a simple 2D shape using my PCB editing program and then used a program called dxf2gcode to create a gCode file that EMC can use. 

As a test, I also installed a program called CncSimulator which seems to allow me to simulate the gCode in the file that I have created. It looks like it produces sensible toolpaths but I have not tried running it on the machine yet  I plan to run it with a pencil in the chuck first to see what it would cut.

My question: - I see quite a few people showing nice 3D images of their models created in one program or another but I don't know how I would go about taking a 3D image and creating gCode from it?

Am I right in thinking that when they want to machine a specific part, they get the program to show them a 2D image and then they export that to DXF and then convert from DXF to gCode - or is there a simpler way?

Regards
Martin


----------



## cobra428 (Sep 17, 2009)

eskimobob
Our vendors at work have solidworks (which we use) and MasterCam software .But when dealing with other vendors we give them an "iges" or "stp" file. Their software is able to take that in with no problems.
Hope this helps a little
Tony


----------



## mu38&Bg# (Sep 17, 2009)

You'll need a 3D CAD software and a CAM software. I use Solidworks and VisualMill. Many CAM software have drawing capability, but they are often limited compared to design software. It's a pretty steep learning curve if you have never done it. It is rewarding. I often recommend people take a class if available at a local college to learn the CAD.


----------



## vlmarshall (Sep 17, 2009)

Some of the 3d images you've seen are a by-product, not the design tool themselves. 
Like this one, generated in a CAM program from essentially a line drawing, the program shows a simulation of the cutting process in action, starting with a solid lump of stock.


----------



## eskimobob (Sep 17, 2009)

Thanks guys. I've been looking at TrueSpace for 3D cad but not installed it yet. It seems that if it can create iges or stp files then I am on the right lines.


----------



## Krown Kustoms (Sep 17, 2009)

Vernon, if you dont mind what is the cam program you are using?


----------



## vlmarshall (Sep 17, 2009)

Krown Kustoms  said:
			
		

> Vernon, if you dont mind what is the cam program you are using?


That's FeatureCAM. We use it at work.


----------



## Krown Kustoms (Sep 18, 2009)

Thanks Vernon, I have a few different CAD/CAM programs, I am looking for one that dosent take all day to draw up a part.
Sorry if I hijacked this thread - I have Bob CAD/CAM I havent used it much but I think you can import just about any CAD file to it.
I drew a 3D cube with a couple chamfers and a spherical pocket in it and posted the G-code, it looked good and you can watch a toolpath simulation from start to finish to make sure you dont collide with hold downs and islands in the drawing.
I have Mach 3 to run my mill but the CAM program (Lazycam) dosent impress me I use it for 2D RC parts but I dont think its worth much else.

-B-

I hope I helped, sorry if I went out in left field somewhere with your question, I cant stop thinking about my lathe I think I destroyed yesterday.


----------



## rog/tn (Sep 27, 2009)

;D Hey Vern...
I also use FeatureCam. I have written a Post Processor that will generate G-code from FeatureCam for An EMCO CNC5 lathe. I will be glad to share if anyone is interested. *discussion*
rog/tn


----------



## deere_x475guy (Sep 27, 2009)

I am exploring the same thing right now. I am creating the iges file with Alibre and I have a trial version of Strutcam. I am stumbling on creating the tool paths right now in Strutcam so I need to work on the tutorials a bit more. They did have a tutorial I finished then tried to get it into mach3 that I downloaded off the Tormach site...that didn't seem to do much so I have a lot of learning to do...


----------



## vlmarshall (Sep 27, 2009)

Well, the demo version of Mach3 only runs ...either 50 or 500 lines of code, I forget which, but it was a cripplingly small amount. Enough to try it out, which is the point after all... but not enough to really run anything good.

Anyway, what I'm saying is, maybe it wasn't your code generation that was the problem. ???


----------



## deere_x475guy (Sep 28, 2009)

Vernon, thanks I am very new to this and am pretty much lost with it for now. Can I bounce a few things off you once I feel I least have a sense of what I need to do?


----------



## eskimobob (Sep 28, 2009)

I've been playing with CamBam - www.cambam.co.uk


----------



## CrewCab (Sep 28, 2009)

eskimobob  said:
			
		

> I've been playing with CamBam



Saw it in operation at Harrogate and talked for a while with the guy who wrote it, seems to work well and fairly straightforward to use ........... helpful bloke to chat with too .......... he's also at the Midlands Engineering Exhibition in October.

CC


----------



## vlmarshall (Oct 9, 2009)

deere_x475guy  said:
			
		

> Vernon, thanks I am very new to this and am pretty much lost with it for now. Can I bounce a few things off you once I feel I least have a sense of what I need to do?



Absolutely!


----------



## eskimobob (Oct 31, 2009)

Just an update on this in case anyone else finds it useful - I bought Alibre while it was on the $99 special and created a part in that. Then got Alibre to export a 2D drawing to DXF. Imported that into CamBam and then added some drill operations and some 2.5D operations before generating a gCode file. Opened the gCode file on EMC2 and cut - worked very well. 8)


----------

