Snapmaker2-Controller icon indicating copy to clipboard operation
Snapmaker2-Controller copied to clipboard

Feature Request: Support G2/G3 arcs

Open constant-flow opened this issue 4 years ago • 14 comments

Hi, when using the CNC post-processor of FreeCAD you also provide i realised, that arcs G2 and G3 are not supported. I read that your Fusion360 post-processor breaks the arcs into linear moves G1. What is the temporary approach for me for now as well.

But, why isn't G2-3 supported, as the firmware is based on Marlin, if i understand correctly.

Is there a technical/hardware limitation? Else it should be more or less one line to enable it: https://marlinfw.org/docs/configuration/configuration.html#g2/g3-arc-support

From what i read it should be activated already (firmware config) but Luban informs it is not supported.

When running the job, the Snapmaker2 gets pretty slow/pauses at the arcs.

Thx in advance 😄

tag me as [Firmware: General Marlin]

constant-flow avatar Feb 08 '21 17:02 constant-flow

They did change something a few years ago. Minimum segments for G2/G3. Better for small arcs. (#13466) so it must have been though of.

tigercjn avatar Feb 16 '21 06:02 tigercjn

@tigercjn That change does not come from Snapmaker but from upstream Marlin, so it doesn't necessarily imply that Snapmaker thought about it.

@constant-flow On my Snapmaker 2.0 G2 and G3 work correctly, but I never tried it through Luban. Have you tried sending the commands directly?

zauguin avatar Feb 16 '21 11:02 zauguin

Great, they should work then, someone else had layer shifting being caused by they think G2 and G3. I will give it some testing.

On Tue, 16 Feb 2021 at 22:44, Marcel Krüger [email protected] wrote:

@tigercjn https://github.com/tigercjn That change does not come from Snapmaker but from upstream Marlin, so it doesn't necessarily imply that Snapmaker thought about it.

@constant-flow https://github.com/constant-flow On my Snapmaker 2.0 G2 and G3 work correctly, but I never tried it through Luban. Have you tried sending the commands directly?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Snapmaker/Snapmaker2-Controller/issues/76#issuecomment-779783404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ35Q4JQMMWZY3HFGVUJO5LS7JLCVANCNFSM4XJNEDJQ .

tigercjn avatar Feb 17 '21 03:02 tigercjn

Sending codes via console work but when included in a cnc file they behave weird very slow/pause (maybe the F wasn't included but the firmware was searching for it)

When sending the codes manually, the machine sounded weird for slower arc lines (almost like step skipping). I never investigated deeper into this, as i thought devs might had a reason to suggest linear movements over arcs (see fusion360)

For the meantime I adjusted the post-processor in a fork of this branch. It's quite a codechange so not sure if i should open a PR - but it converts all curved movements to tiny segments and also accepts non-marlin drill commands (use care fully as spindle speed is too high for deeper+bigger holes ♨️ ). And creates a picture of the job.

constant-flow avatar Feb 17 '21 06:02 constant-flow

Hi all, Thanks for feedback!

We didn't test G2/G3 before, but controller firmware will be optimized for this later.

scotthsl avatar Feb 20 '21 04:02 scotthsl

Hi, can I add my observations?: I recently did a simple CNC job, milling a small internal rectangular profile with radiused corners. Corner arc radius generated is only 0.5mm (G2). Milling feedrate 600mm/min. Controller virtually stops when processing the corners - then takes off again for the linear sections. Checking the G2_G3.cpp code, is it possible that the call to thermalmanager.manage_heater() on every iteration of the segments (line 163) is causing slow calculation time? Could it move to the idle handling below so it's not called on every iteration? I might, however, be out of my depth here!

Sample G-Code for one depth pass: ; 2mm 2 flute Endmill M3 P100 G0 X-104.5 Y-22.5 G0 Z1.0 G1 F300.0 Z-1.0 G1 F600.0 Y-20.0 G2 X-104.0 Y-19.5 I0.5 J0.0 G1 X-47.0 G2 X-46.5 Y-20.0 I0.0 J-0.5 G1 Y-22.5 G2 X-47.0 Y-23.0 I-0.5 J0.0 G1 X-104.0 G2 X-104.5 Y-22.5 I0.0 J0.5

Mark

infoteknix avatar Mar 18 '21 12:03 infoteknix

I've noticed this exact slow behavior when trying to 3d print using G2/G3 arcs.

I use the OctoPrint plugin to create gcode with arcs, but it isn't usable because of this issue.

dpeart avatar Mar 22 '21 14:03 dpeart

Request received and we have added it to the request pool.

ldp7 avatar Apr 22 '21 04:04 ldp7

Just to add a bit of context to this: I was chatting with the author of ArcWelder (processes gcode to convert points into arcs), and his quick review of the Snapmaker firmware indicated that it's an older version of Marlin, which has some issues with the arc commands. Merging in the current version should resolve the "slow behaviour" when using G2/G3 commands.

If you need an example, I've popped some samples here: https://www.amazon.com.au/clouddrive/share/5xn1PvIHdet8E5VtRsMonCFFwOHPEZ3xphCGzJMRguF. There's the stl file for a model of a few curves, the gcode as generated by Luban, and the gcode as processed by ArcWelder.

I've got a video side-by-side comparison of printing the original and the "welded" gcode here: https://youtu.be/_qbOlGby4Pc (yes, it's over an hour long - the first 60 seconds should show you everything you need to see!)

rstocks avatar Aug 21 '21 00:08 rstocks

Well done on showing the benefits of AcrWelder and also of using the latest Marlin updates, with data like this action should be taken and released ASAP by the team.

Great input. Chris

On Sat, 21 Aug 2021 at 10:38, Richard Stocks @.***> wrote:

Just to add a bit of context to this: I was chatting with the author of ArcWelder (processes gcode to convert points into arcs), and his quick review of the Snapmaker firmware indicated that it's an older version of Marlin, which has some issues with the arc commands. Merging in the current version should resolve the "slow behaviour" when using G2/G3 commands.

If you need an example, I've popped some samples here: https://www.amazon.com.au/clouddrive/share/5xn1PvIHdet8E5VtRsMonCFFwOHPEZ3xphCGzJMRguF. There's the stl file for a model of a few curves, the gcode as generated by Luban, and the gcode as processed by ArcWelder.

I've got a video side-by-side comparison of printing the original and the "welded" gcode here: https://youtu.be/_qbOlGby4Pc (yes, it's over an hour long - the first 60 seconds should show you everything you need to see!)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Snapmaker/Snapmaker2-Controller/issues/76#issuecomment-903023566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ35Q4ORYSKJIN3J7QS7K3LT53YQDANCNFSM4XJNEDJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

tigercjn avatar Aug 21 '21 04:08 tigercjn

Just a little info on the slow G2/G3 moves, in case the merge with current marlin version is delayed because it can bring some other troubles on the stack. A quick fix in the meantime could be this :

Recommended to change files G2_G3.cpp#L219 and G2_G3.cpp#L239 and replace seg_length by 0.0

Source : MarlinFirmware/Marlin#17348

JostTim avatar Dec 22 '21 00:12 JostTim

@ldp7 Any updates on support for this?

dapendragon avatar Mar 21 '23 08:03 dapendragon

Can confirm this issue still exists as of September 2023

BurntVoxel avatar Sep 25 '23 18:09 BurntVoxel