zooc.data.offset_data
Offset data contains the Z-offset calibration data.
- class zooc.data.offset_data.OffsetData(offset_temps=<factory>)
Bases:
objectCollection of Z-offsets (OffsetTemp) at certain temperatures with interpolation functions.
- Parameters:
offset_temps (list[OffsetTemp]) – List of OffsetTemp instances containing bed and extruder temperatures and z-offsets measurement.
- static build_text(list_lines)
Create OffsetData from the list of key-value pairs.
- calculate_z_offset(temps_ref, temps)
Calculate relative Z-offset to reference point.
Positive value indicates the nozzle should be lifted to keep the distance to bed constant at given temperature.
- get_z_ref(temps)
Get the absolute z-offset for the given temperatures.
- Parameters:
temps (Temps) – The temperatures.
- Returns:
Absolute Z-offset at the temperature <temps>.
- Raises:
ValueError – If the z-offset is not defined for the given temperatures.
- Return type:
- to_string()
Convert offset data to key-value multiline string.
See
offset_temp.OffsetTemp.to_string()- Returns:
Lines of:
<key_1a>=<value_1a>, <key_1b>=<value_1b>, ... <key_2a>=<value_2a>, <key_2b>=<value_2b>, ... ...
- Return type:
- property get_interp: SurfaceExtrapolator
Create and get interpolator for the calibration data.
- Returns:
Interpolator function.