584,862 active members*
5,048 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2004
    Posts
    26

    G-Code Generation

    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?

  2. #2
    Join Date
    Mar 2004
    Posts
    1147
    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.
    Design & Development
    My Portfolio: www.robertguyser.com | CAD Blog I Contribute to: http://www.jeffcad.info

  3. #3
    Join Date
    Mar 2003
    Posts
    35538
    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
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  4. #4
    Join Date
    Apr 2004
    Posts
    26
    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 .

  5. #5
    Join Date
    Mar 2003
    Posts
    35538
    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?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  6. #6
    Join Date
    Apr 2004
    Posts
    26
    Constantly moving up and down while cutting. If you can picture a circular pattern with a sloping profile on both sides...

  7. #7
    Join Date
    Apr 2003
    Posts
    416
    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

  8. #8
    Join Date
    Apr 2004
    Posts
    26
    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 .

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    Bill, when is your 3D version of g-code out going to be available?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Apr 2003
    Posts
    416
    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.
    Bill.

Similar Threads

  1. parametric programming
    By Karl_T in forum CamSoft Products
    Replies: 21
    Last Post: 05-24-2005, 08:58 PM
  2. I need sample G code program
    By bunalmis in forum G-Code Programing
    Replies: 1
    Last Post: 08-24-2004, 09:50 AM
  3. G Code Generation
    By robbycar in forum Uncategorised MetalWorking Machines
    Replies: 3
    Last Post: 05-20-2004, 01:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •