chilipeppr / tinyg

The tracking location for tickets for the chilipeppr.com/tinyg workspace.
28 stars 16 forks source link

G2/G3 arc bugs #10

Open johnlauer opened 9 years ago

johnlauer commented 9 years ago

Hi, I was wondering why chilipeppr did not display some of my gcode correctly. I could finally reproduce it with a simple test case: The attached gcode contains 4 shapes like the digit 8 (see output of OpenSCAM, this is also how tinyg interprets it). First shape, lower left: Done with G2 and G3 with paramters I and J (circle center). All OK here. Second shape, upper left: Done with G2 and G3 with parameter R (radius); 270 degree arcs cannot be specified uniquely by radius, gcode interpreters take it as a 90 degree arc. Note how chilipeppr does it right for the G3, but not for the G2. Third shape, upper right: Same, but 270 degree arcs are broken up as 180 + separate 90 degree arcs. Fourth shape: Like the first one, but the G2 and G3 are written on the same line as a G17 (in my understanding perfectly legal). Chilipeppr ignores the complete line.

Not a very big or urgent problem as it only affects the preview with some types of gcode, but probably also not hard to fix.

khapple commented 9 years ago

I just ran into this bug trying to visualize some g-code produced by a cam software I was trying. chilipeppr displayed my interpolated hole just like the bottom right example which made it appear like a peck drilling operation. This had me concerned that the cam software I was trying wasn't working very well. I found this issue report and I went in and added a line break after every single G17 command and chilipeppr displayed perfectly. Would love to see this corrected automatically.

chilipeppr commented 9 years ago

Can you post some pictures of befor/after you added the newlines? Or share your two gcode files before/after your newlines? I'd like to check out this bug. I haven't heard of it before.

On Wed, Feb 4, 2015 at 5:10 PM, Kerry Happle notifications@github.com wrote:

I just ran into this bug trying to visualize some g-code produced by a cam software I was trying. chilipeppr displayed my interpolated hole just like the bottom right example which made it appear like a peck drilling operation. This had me concerned that the cam software I was trying wasn't working very well. I found this issue report and I went in and added a line break after every single G17 command and chilipeppr displayed perfectly. Would love to see this corrected automatically.

— Reply to this email directly or view it on GitHub https://github.com/chilipeppr/tinyg/issues/10#issuecomment-72975717.

khapple commented 9 years ago

Sure.

No line break: http://pastebin.com/YA05Ra1n http://i.imgur.com/1248WMW.png

Line break: http://pastebin.com/zHxAZ6Xz http://i.imgur.com/cD8GRJv.png

Thanks.