Results 1 to 9 of 9

Thread: Drag knife compensation algorithm

  1. #1
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    91
    Downloads
    0
    Uploads
    0

    Drag knife compensation algorithm

    I'm writing a bit of code to generate some G-Code for a drag knife I've installed in my cnc router. I can do the straight stuff and turn corners fine (similar to this http://www.summa.be/pages/nfo_tangentialordrag.html).

    What I am wondering about, is cutting circles and curves. If the knife has an offset, will the cut circle be smaller than the one traced? If so, how do I calculate the compensation amount for the circle? I assume it is a function of the offset and the circle diameter?

    Thanks,
    Frank


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    91
    Downloads
    0
    Uploads
    0
    I think I worked this out...

    If I keep the knife point on the circle at a tangent, then it is a simple case of using the pythagoras theorem to calculate the compensated radius...

    compenstated_radius = sqrt( radius ^ 2 + knife_offset ^ 2 )


  3. #3
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    That looks OK to me.
    Your next problem is to move the cutter to the start of the arc will also need some trig.


  4. #4
    Registered
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    91
    Downloads
    0
    Uploads
    0
    My circles are actually holes, so it is easy enough to start in the center, move to the edge, then swivel to point in the right direction.


  • #5
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    847
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by ftkalcevic View Post
    I think I worked this out...

    If I keep the knife point on the circle at a tangent, then it is a simple case of using the pythagoras theorem to calculate the compensated radius...

    compenstated_radius = sqrt( radius ^ 2 + knife_offset ^ 2 )
    I believe the curve you are looking for is a cycloid. Search google for "brachistochrone". Your method will possibly work for a complete circle, but it will fail if you move from a line to an arc to a line. Think of a truck making a tight 90 degree turn with a long trailer. This is an interesting mathematical problem.


  • #6
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by SBC Cycle View Post
    I believe the curve you are looking for is a cycloid. Search google for "brachistochrone".
    I googled "brachistochrone" and "cycloid", but I'm unable to see the relationship to a toolpath.

    This is how I see a toolpath for a keyhole would be.
    Open to corrections.
    Attached Images Attached Images
    Last edited by Kiwi; 01-21-2009 at 06:34 PM. Reason: correct grammar


  • #7
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    847
    Downloads
    0
    Uploads
    0
    Examine this drawing carefully and you will see the error of the arc offset method. A simple arc offset will only approximate the path the centerline of the tool should follow (represented by the points). It may be more than sufficient for the purpose of representing a circle while cutting vinyl, but it also makes for inefficient toolpath.

    Also open to corrections.
    Attached Images Attached Images


  • #8
    Registered
    Join Date
    Jul 2003
    Location
    New Zealand
    Posts
    1,137
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by SBC Cycle View Post
    Examine this drawing carefully and you will see the error of the arc offset method........Also open to corrections.
    Sorry to question your post, BUT is your drawing to scale?
    I am unable to duplicate your drawing.
    I'm sure a trailing blade does not give a perfect shape. I imagine the blade will act like a fish tail in some areas. I guess this goes with the benefits of a trailing blade setup.
    Attached Images Attached Images


  • #9
    Registered
    Join Date
    Apr 2008
    Location
    USA
    Posts
    847
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Kiwi View Post
    Sorry to question your post, BUT is your drawing to scale?
    I am unable to duplicate your drawing.
    I'm sure a trailing blade does not give a perfect shape. I imagine the blade will act like a fish tail in some areas. I guess this goes with the benefits of a trailing blade setup.
    Please, don't apologize! I very well could be wrong. When I get a moment I will start over with a fresh BobCAD file and try to explain how I got my results. I love this kind of problem. Some people are crazy over Sodoku, I get my kicks on math puzzles.


  • Similar Threads

    1. Drag Engraver
      By Regnar in forum Benchtop Machines
      Replies: 8
      Last Post: 04-22-2011, 02:16 AM
    2. How to homebrew a drag knife for vinyl cutting
      By abasir in forum Drag Knife Cutting
      Replies: 11
      Last Post: 11-01-2010, 09:58 PM
    3. Algorithm?
      By CNCgr in forum OpenSource Software
      Replies: 16
      Last Post: 12-07-2009, 06:23 PM
    4. Problem- using the drag command
      By Claude Boudreau in forum BobCad-Cam
      Replies: 4
      Last Post: 12-07-2008, 04:12 PM
    5. Home Built Router/Drag Diamond Engraver
      By DaSigntist in forum DIY CNC Router Table Machines
      Replies: 49
      Last Post: 01-24-2005, 02:02 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.