====== Understanding the gcode Z offset ====== {{tag>articles z_offset}} === Good Further Reading === * Ellis's Print Tuning Guide on [[https://ellis3dp.com/Print-Tuning-Guide/articles/first_layer_squish.html|First Layer "Squish"]] ==== Related wholly to non-tangential squish ==== === General concepts of squish and non-tangential shape === (wip) Generally speaking an otherwise uninfluenced extrusion from the nozzle will have a circular cross section. If an extruded line is placed next to another extruded line which each have a circular cross section they only tangentially connect. It will also only tangentially connect with the plate resulting in very poor adherence. A more rectangular cross section is desirable for maximal surface area connection. By adjusting the layer height very slightly we can control this shape and it will become more "stadium" shapped, flat on the top and bottom and rounded on the sides. If we don't have good surface area connection in the extrusion lines the print will also be very weak and fall part on the layers. === Squish will be different for different layer heights === === Squish will be different for different filaments === * Material * type * brand * color * Build plates === What does good squish look like? === * Examples (click to enlarge) * {{:9tbrmczrjfdqftu3tcgbnc-1200-80.png?400|}} * {{::image.png?400|}} ==== Setting the gcode offset value ==== === Klipper commands === The gcode z offset is set with the ''SET_GCODE_OFFSET'' klipper command and you should read its documentation, at https://www.klipper3d.org/G-Codes.html#set_gcode_offset All other methods of changing the value just equate to this command. You can set it to a absolute value like SET_GCODE_OFFSET Z=0.075 or adjust it relative to its current value like SET_GCODE_OFFSET Z_ADJUST=0.3 === Fluidd GUI === [[Fluidd]] provides easy to use controls and displays the current value, live. {{ :fluid_z-offset_settings.jpg |}} === Why not by Screen === Workflows using the [[Screen]] can be problematic as proper attention needs to be considered for how this value may be being changed by other controls. It is not displayed live and the value shown is often stale. This can result in issues when it send incremental value changes. The Screen does not send absolute adjustment values to Klipper, it send relative value changes. This means the Screen's understanding of the gcode z offset can differ from what it actually is, so if it still believes the offset is, say, 0.125, and it was really 0.200, when you adjust the offset on the screen by 0.100 that issues a ''SET_GCODE_OFFSET Z_ADJUST=0.100'' command and the offset becomes 0.300mm and not 0.225mm. Saving it in the Screen's workflows can also trigger changes to other values unintentionally. It's better and easier to change the value in the console or in the [[Fluidd]] GUI. === Slicer settings=== == As a filament setting (change filament gcode)== You can save the gcode z offset for a specific filament and have that then set the gcode z offset value from the slicer as part of the filament settings: {{ :orca_slicer_filament_z-offset_setting.jpg?400 }} This can be useful if you want to store your gcode value as part of your filament setting rather than manually keeping track of it and adjusting it manually before you start to print. This way the value is also stored as part of the filament profile and changes when you change loaded filament profiles. == Printer settings == The gcode z offset can be set by the slicer as a printer adjustment, yet **this method is not recommended** as the slicer then recalculates and applies the offset value to all movement directives it produces in the gcode file. This is more designed to provide an error adjustment to the nozzle height to account for the probe incorrectly positioning the nozzle. Since we can calibrate the probe this is unnecessary and is mentioned here just so we understand this isn't a good method should you stumble on the setting. You can set the gcode z offset as part of the printer configuration like so: {{ :orca_slicer_z-offset_settings.jpg?400 }} ===== Determining and calibrating the gcode z offset ===== Follow the procedure described in [[how_should_i_set_the_z_offset_to_adjust_nozzle_height|How should I set the z offset]]. === Can this be realistically calibrated using the paper method? === No. At best the paper method will asymptotically approach the thickness of the paper being used. Yet this is an arbitrary value nearly in the ball park of what a typical z offset might be. The z offset we're seeking is filament dependent and will vary by the filament being used. We're seeking a correct affect on the shape of the extrusion's cross section, a "smush", and that can't be defined by some arbitrary height. The same logic applies to using [[why_not_feeler_gauges|feeler gauges]]. ===== Related Topics ===== === Is the CC setting the z offset or setting the probe z offset? === The Elegoo Centauri Carbon has sensors to "set the z offset", yet it's setting the probe offset. Prints will often still require a gcode z offset adjustment. ==== Z Probe calibration -- the other Z Offset ==== See [[probe_calibration| Probe Calibration]] ==== How the Probe and GCODE Z Offset Relate ==== [[layer_height_compostion|Diagram]] showing layer height composition.