prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.54k stars 1.9k forks source link

GCode spam on perimeter overhangs caused by M106 enable fan commands #11856

Open ArsicN opened 7 months ago

ArsicN commented 7 months ago

Description of the bug

When slicing any model that has curving overhang perimeters(from what I noticed, may apply to others), the slicer outputs multiples of M106 enable fan commands before and after each of the G1 commands. Using both 'Bridges fan speed' and 'Dynamic overhang fan' makes the issue twice as bad, but it is still there regardless of which of the either two is enabled/disabled.

Here is an example with a simple squished benchy(simply to force the overhang perimeter generation) that clearly shows the problem: image

If I disable 'Bridges fan speed' by setting it to 0, it gets slightly less insane, however still very bloated: image

The side effect of this was some stuttering of the printer when it reaches the overhangs, which was inexplicable to me at first. Another problem is that Arc Fitting does not recognize the overhang perimeters because of the M106 spam instead of neat G1 blocks of gcode. I've tried the same thing in PS 2.6.1 and everything seems to work correctly, with G1 commands staying in blocks, with M106 only before and after the whole block, as expected. Here's the 2.6.1 example with the same benchy: image

Project file & How to reproduce

M106 spam benchy.zip

Checklist of files included above

Version of PrusaSlicer

2.7.0+win64

Operating system

Windows 10 22H2

Printer model

Ender 3 V2 Neo (with mods)

bobjackman commented 5 months ago

related: https://github.com/prusa3d/PrusaSlicer/issues/11981