587,204 active members*
3,137 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014
    Posts
    3

    Exclamation center point of circle

    When the Gcode has G2 Xa Yb Rc;

    How can i find center point of this circle .

    Thanks...

  2. #2
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by ferhaatbeey View Post
    When the Gcode has G2 Xa Yb Rc;

    How can i find center point of this circle .

    Thanks...
    To calculate the centre of the arc, the Control uses:
    1. the coordinates of the location prior to the circular move as the arc Start Point
    2. the End coordinates specified in the circular move block as the arc End Points
    3. the Radius value specified in the circular move block


    Following is an example of the math used in such an algorithm

    Where:
    X = Resultant X centre point
    Y = Resultant Y centre point
    X1 = 1st X point
    Y1 = 1st Y point
    X2 = 2nd X point
    Y2 = 2nd Y point
    r = Arc Radius

    The following can be used to find the arc centre point.

    'Get distance between 1st and 2nd points
    q = Sqr((X2 - X1) ^ 2 + (Y2 - Y1) ^ 2)

    'Find mid point of q (X3,Y3)
    X3 = (X1 + X2) / 2
    Y3 = (Y1 + Y2) / 2


    All two sets of points and given radii will have two arc centre points, hence the two examples shown below. In software, the correct centre point for the application would be determined by G02 or G03 specified in the command block.

    'Find centre point of circle
    X = X3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
    Y = Y3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q

    X = X3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
    Y = Y3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q


    Regards,

    Bill

Similar Threads

  1. cant cut a circle? "current point same as end point of arc"
    By maccrazy2 in forum DeskCNC Controller Board
    Replies: 1
    Last Post: 02-14-2012, 07:15 AM
  2. Find center of circle
    By dano9700 in forum Engraving Machines
    Replies: 3
    Last Post: 12-16-2010, 02:19 AM
  3. Error in end point of circle.
    By crkdinesh in forum EdgeCam
    Replies: 1
    Last Post: 11-29-2010, 05:03 PM
  4. find center point of circle
    By Farzaneh_2010 in forum G-Code Programing
    Replies: 14
    Last Post: 10-10-2010, 08:34 AM
  5. Replies: 1
    Last Post: 02-04-2007, 03:33 PM

Tags for this Thread

Posting Permissions

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