Circle G-Code
Moderators: SDS, support, admin
Circle G-Code
Good morning
We have a problem with a conversion to G-code. When we have a entie arc the converison to G-code
makes a starting point, an end point and radius with this data we can calculate the angles and make the arc, but with a entitie circle when translated to g code we have that the start and end point generated are the same with what when calculating the angle gives us 0. When entering the G code generated in a standard viewfinder happens the same the circles do not draw them well because of this. We have seen that in code g to define a circle the g2/g3 is also used plus the point plus the center point of the arc. This can be configured in some way in the G-code converter or we are doing something wrong when calculating the circle from the G code generated by cad.net
Thanks
Attachments
dxf.zip Original dxf desing
1.jpg picture off gcode viewer
2.jpg picture off original desing
g-code create by cad.net
F0
S 0
G0 X72.7 Y36.47
F0
G1 Z0
F0
G1 X51.33 Y72.48
G2 X51.45 Y95.63 R22.5
G1 X72.63 Y131.45
G2 X90.21 Y121.93 R10
G3 X90.69 Y94.26 R30
G2 X90.45 Y73.2 R22.5
G3 X90.27 Y46.01 R30
G2 X72.7 Y36.47 R10
G0 Z0
G0 X86.32 Y41.54
F0
G1 Z0
F0
G3 X86.32 Y41.54 R5
G0 Z0
G0 X55.69 Y75.29
F0
G1 Z0
F0
G1 X70.7 Y66.64
G1 X85.69 Y75.31
G1 X85.68 Y92.63
G1 X70.67 Y101.28
G1 X55.68 Y92.61
G1 X55.69 Y75.29
G0 Z0
G0 X86.26 Y126.39
F0
G1 Z0
F0
G3 X86.26 Y126.39 R5
G0 Z0
lines with problem G3 with R5
thanks
We have a problem with a conversion to G-code. When we have a entie arc the converison to G-code
makes a starting point, an end point and radius with this data we can calculate the angles and make the arc, but with a entitie circle when translated to g code we have that the start and end point generated are the same with what when calculating the angle gives us 0. When entering the G code generated in a standard viewfinder happens the same the circles do not draw them well because of this. We have seen that in code g to define a circle the g2/g3 is also used plus the point plus the center point of the arc. This can be configured in some way in the G-code converter or we are doing something wrong when calculating the circle from the G code generated by cad.net
Thanks
Attachments
dxf.zip Original dxf desing
1.jpg picture off gcode viewer
2.jpg picture off original desing
g-code create by cad.net
F0
S 0
G0 X72.7 Y36.47
F0
G1 Z0
F0
G1 X51.33 Y72.48
G2 X51.45 Y95.63 R22.5
G1 X72.63 Y131.45
G2 X90.21 Y121.93 R10
G3 X90.69 Y94.26 R30
G2 X90.45 Y73.2 R22.5
G3 X90.27 Y46.01 R30
G2 X72.7 Y36.47 R10
G0 Z0
G0 X86.32 Y41.54
F0
G1 Z0
F0
G3 X86.32 Y41.54 R5
G0 Z0
G0 X55.69 Y75.29
F0
G1 Z0
F0
G1 X70.7 Y66.64
G1 X85.69 Y75.31
G1 X85.68 Y92.63
G1 X70.67 Y101.28
G1 X55.68 Y92.61
G1 X55.69 Y75.29
G0 Z0
G0 X86.26 Y126.39
F0
G1 Z0
F0
G3 X86.26 Y126.39 R5
G0 Z0
lines with problem G3 with R5
thanks
- Attachments
-
- 2.jpg (115.94 KiB) Viewed 2499 times
-
- 1.jpg (108.4 KiB) Viewed 2499 times
-
- dxf.zip
- (3.75 KiB) Downloaded 439 times
Re: Circle G-Code
Hello,
For your information: G3 defines a counter-clockwise arc. An arc move starts at the current position and ends at the given XYZ, pivoting around a center-point offset given by I and J or R.
In the given case the G3 command has so-called 'R Form' where R specifies an X offset from the given X to the arc center point. In other words, if we add the R value to the center point's X, we get the X value given in G-Code.
The example below shows how to calculate a circle from the given X, Y and R:
CenterPoint.X = X - R (86.32 - 5) = 81.32;
CenterPoint.Y = Y = 41.54;
Radius = R = 5.
Knowing the values of CenterPoint.X, CenterPoint.Y and Radius, you can draw a circle.
Mikhail
For your information: G3 defines a counter-clockwise arc. An arc move starts at the current position and ends at the given XYZ, pivoting around a center-point offset given by I and J or R.
In the given case the G3 command has so-called 'R Form' where R specifies an X offset from the given X to the arc center point. In other words, if we add the R value to the center point's X, we get the X value given in G-Code.
The example below shows how to calculate a circle from the given X, Y and R:
Code: Select all
G3 X86.32 Y41.54 R5
CenterPoint.Y = Y = 41.54;
Radius = R = 5.
Knowing the values of CenterPoint.X, CenterPoint.Y and Radius, you can draw a circle.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support