kcoaks
04-03-2004, 12:26 AM
I apologize if this is the inappropriate place to post this.
The software developer in me always wants a piece of the action. It seems that the real heart of the magic is in the generation of the g-code. Are there any wizards out there that can help me understand how such complicated drawings are converted into such simple X,Y,Z movements?
vacpress
04-03-2004, 01:06 AM
kcoaks - checkout my "CNC Gantry Painter" thread. I really could use some help.. but it needs to be someone who can learn fast, or else allready knows alot. read the whole thread and you will understand the issue.
ger21
04-03-2004, 08:24 AM
The software developer in me always wants a piece of the action. It seems that the real heart of the magic is in the generation of the g-code. Are there any wizards out there that can help me understand how such complicated drawings are converted into such simple X,Y,Z movements?
Are you talking about converting 2d .dxf's to g-code, or complex 3D models?
I wrote a simple Autocad macro converter to convert lines into G-code. It's a simple process of just getting the lines x,y,z coordinates and basically just reformatting those coordinates into a g-code file. This is how the .dxf converters work. Mine just does it in AutoCAD without having to export a .dxf.
The 3D converters, are a lot more complicated. And they work in a lot of different ways. The simplest ones read .stl files (or 3d .dxf's) and basicallyfigure out the toolpaths based on the models triangular surfaces. Similar to the 2D method I mentioned above, only they read the coordinates of the faces and have the tool travel over those coordinates. The more advanced (and expensive) CAM software can create toolpaths from nurbs surfaces as well. Hope this helps
kcoaks
04-03-2004, 01:30 PM
Gerry-
What's in my mind are the intricate relief pieces you see (I guess they'd be 3D). There are complicated designs complete with circles, arcs, and freehand draws. Then the CNC comes along and with a single pass, never crossing the same point twice, manages to lift and dip with perfect accuracy. I'm sure it can all be worked out mathematically, I just don't know what the heck that math is! If this doesn't make any sense, don't worry, my brain is often on the wrong plane :).
ger21
04-03-2004, 01:39 PM
Are you saying the cuts are all at the same depth? Just lifting up to start and stop? Or constantly moving up and down while cutting?
kcoaks
04-05-2004, 09:19 AM
Constantly moving up and down while cutting. If you can picture a circular pattern with a sloping profile on both sides...
wjbzone
04-05-2004, 10:51 AM
kcoaks,
A basic description:
To develop a 3d path from a surface, start by offsetting the surface to be milled by the radius of the ball end mill. (ie program the center of the ball)
Then intersect that offset surface with a plane (like your YZ plane) to get a spline (or set of XYZ points) that represents one pass of your cnc program.
Hope that helps.
Bill
kcoaks
04-05-2004, 11:13 AM
Judging by even that short description, I think I've bitten off more than I can chew in trying to understand this. Thank you for showing me the extent of my ignorance :confused: ;).
ger21
04-05-2004, 05:08 PM
Bill, when is your 3D version of g-code out going to be available? :)
wjbzone
04-06-2004, 06:23 AM
Gerry,
It will post 3d coordinates if you can draw the 3d polylines.
MDT has a lot of built in tools for generating the tool paths. I'll let you know when I get it automated.:rolleyes:
Bill.