The Box, an adventure in Plywood and G-code

Talk about all things CNC
WillAdams
Posts: 8628
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: The Box, an adventure in Plywood and G-code

Post by WillAdams » Thu Dec 04, 2014 2:49 pm

This bit predates me and has always confused me. Currently the wiki has:


=== G2 - clockwise arc ===

G2 Xx Yy Ii Jj
<gallery>
File:G2.png
</gallery>
Notes:
* I and J are relative to the current position, but X and Y may not be (depends which of G90 or G91 modes is selected)
* If (i,j) isn't half way along a straight line from the start position to (x,y), the move will still begin with an arc of a circle (not an ellipse), and it will be followed by a straight line move to (x,y)


What do we need to do to correct it?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

Gadgetman!
Posts: 1061
Joined: Sun Aug 25, 2013 12:44 pm
Location: Norway
Contact:

Re: The Box, an adventure in Plywood and G-code

Post by Gadgetman! » Thu Dec 04, 2014 7:31 pm

Don't know about the G90 G91 line (I haven't tried circles in anything but Absolute mode, so don't know how it works in relative mode)

Maybe check what it says on the Linuxcnc site as it's supposedly following their spec pretty closely for G2/G3?

All I know is that manually coding anything that goes from/to any point besides the 0/90/180/270 degree points is going to be a real //canine of the female persuasion// to get right unless you're pretty good at maths...
Weird guy...
Shapeoko 2014F: 1000mm X/Y, 300W Quiet Cut spindle, Arduino Uno/G-shield and GRBL 0.9i
15x30 drag chains, custom spindle mount, 9mm belts, 8mm endplates, 6mm motor plates.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: The Box, an adventure in Plywood and G-code

Post by cvoinescu » Thu Dec 04, 2014 9:12 pm

Notes:
* I and J are always relative to the current position.
* X and Y obey the current positioning mode (G90 absolute, G91 relative).
* The current position and the final position (X, Y) must be at the same distance from the center of the arc (I, J).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: The Box, an adventure in Plywood and G-code

Post by cvoinescu » Thu Dec 04, 2014 9:17 pm

Gadgetman! wrote:Maybe check what it says on the Linuxcnc site as it's supposedly following their spec pretty closely for G2/G3?
Checked. LinuxCNC also has G90.1 and G91.1, which change I J K to absolute or back to relative, respectively, but they are not supported in GRBL (I checked the source code), so I don't think there's a need to mention that on the wiki.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Gadgetman!
Posts: 1061
Joined: Sun Aug 25, 2013 12:44 pm
Location: Norway
Contact:

Re: The Box, an adventure in Plywood and G-code

Post by Gadgetman! » Fri Dec 05, 2014 11:27 am

Sound some formulas to help me calculate the correct X/Y points:
http://www.math.com/tables/geometry/circles.htm
(Bottom of the page)
Weird guy...
Shapeoko 2014F: 1000mm X/Y, 300W Quiet Cut spindle, Arduino Uno/G-shield and GRBL 0.9i
15x30 drag chains, custom spindle mount, 9mm belts, 8mm endplates, 6mm motor plates.

Post Reply