SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
6.2k stars 717 forks source link

source-aligned spiral z-hop for print quality #5661

Open czlr opened 1 month ago

czlr commented 1 month ago

Is there an existing issue for this feature request?

Is your feature request related to a problem?

Currently, spiral z-hops are only done via G3 (counterclockwise arc move) and aligned based on the movement destination

For example, referring to the image below:

Problem: I believe, based on theory and testing, that the transition between lines (1) and (2) -- i.e., how the nozzle begins the z-hop as it leaves the printing plane -- has a much bigger impact on print quality than the transition between lines (2) and (3). Since by the time the latter happens, the nozzle is already several mm above the print surface.

image

The screenshot above is a relatively non-problematic example. But I've had situations where the initial G3 motion juts straight out perpendicular to an outer wall. Which can leave pretty nasty scarring for min-max'ed edge cases where you don't have room to dial other settings like cooling and retraction (fully-dense glass-like PETG, flexible/tough filaments, etc).

image

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

My theory/proposal is that it would be better for spiral z-hops to be aligned WRT their starting contexts. Such that:

image

Describe alternatives you've considered

Re: the specific alignment strategy, I think there are some potential options, with different potential theories for why they could be ideal.

image

Additional context

Environment: OrcaSlicer v2.0.0 + Bambu P1S

Nathan22211 commented 1 month ago

I feel like we need some more testing than just one of your printers. You said you had a postscript. Maybe if you provided that we could confirm this to be a common thing with spiral Z hop.

czlr commented 3 weeks ago

Apologies for the delay. Since posting, I might've found a better approach -- rather than aligning with the current motion, just do a static align vs the current layer's walls.

E.g.,

  1. suppose purple is our initial printing path, and we want to zhop at the blue dot
  2. look for the closest wall, and align the center of the zhop spiral (I and J params) so that it wipes away from the wall
  3. choose either G2 or G3 for the spiraling to better match the current path motion. looking inwards from the wall, if the path is more "left to right", use G3 (case 1 in pic). otherwise use G2 (case 2)

image

Here's a postprocessing script I threw together to test

https://gist.github.com/czlr/a7859730299e73ac01c4d85a8a82827d

image