Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
5.95k stars 2.04k forks source link

Z hop on layer change #19234

Open richfelker opened 2 weeks ago

richfelker commented 2 weeks ago

Is your feature request related to a problem?

I frequently get problems with surface zits only on the first part of each layer. This happens because "Z Hop Only Over Printed Parts" and "Avoid Printed Parts When Traveling" do not consider the path to the start of the next layer as colliding with other parts, even though the travel only takes place at the layer-height distance, not the Z-hop distance, above the just-finished layer.

Describe the solution you'd like

If the Z-hop distance is higher than layer height and Z-hop is enabled, there should always be a Z-hop between layers, regardless of the settings for only using Z-hop on collision.

Describe alternatives you've considered

Turning on unconditional Z-hop solves the problem, but is a lot slower and puts excess wear on Z axis.

Affected users and/or printers

All.

Additional information & file uploads

No response

richfelker commented 2 weeks ago

I've tested this adding a condition to the end of LayerPlanBuffer::addConnectingTravelMove, to set path.perform_z_hop if path.retract is true and Z-hop is enabled. It fully solved my zits problem, but produced a weird hop initially to current layer plus hop, then up to new layer plus hop, then finally back down to new layer.