Results 1 to 10 of 10

Thread: G-Code Generation

  1. #1
    Registered
    Join Date
    Apr 2004
    Location
    Spokane, WA, USA
    Posts
    26
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Mar 2004
    Location
    United States
    Posts
    1,147
    Downloads
    0
    Uploads
    0
    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
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    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

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  4. #4
    Registered
    Join Date
    Apr 2004
    Location
    Spokane, WA, USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    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
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    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

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #6
    Registered
    Join Date
    Apr 2004
    Location
    Spokane, WA, USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    Constantly moving up and down while cutting. If you can picture a circular pattern with a sloping profile on both sides...


  • #7
    Registered wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    396
    Downloads
    0
    Uploads
    0
    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
    Registered
    Join Date
    Apr 2004
    Location
    Spokane, WA, USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    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
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,289
    Downloads
    0
    Uploads
    0
    Bill, when is your 3D version of g-code out going to be available?
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #10
    Registered wjbzone's Avatar
    Join Date
    Apr 2003
    Location
    United States
    Posts
    396
    Downloads
    0
    Uploads
    0
    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. looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft
      By troyswood in forum Ability Systems - LPT Indexer and G-Code
      Replies: 2
      Last Post: 12-24-2006, 10:21 PM
    2. parametric programming
      By Karl_T in forum CamSoft Products
      Replies: 21
      Last Post: 05-24-2005, 03:58 PM
    3. I need sample G code program
      By bunalmis in forum G-Code Programing
      Replies: 1
      Last Post: 08-24-2004, 04:50 AM
    4. G Code Generation
      By robbycar in forum General Metal Working Machines
      Replies: 3
      Last Post: 05-20-2004, 08:10 AM
    5. Getting The Most Out of CNCzone's Posting Features
      By CNCadmin in forum CNCzone.com FAQ
      Replies: 0
      Last Post: 03-02-2003, 12:08 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.